diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index d8fb2a5da..1b5b4e2f0 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -661,8 +661,8 @@ impl fmt::Display for ScopeArgs { writeln!(f, "{}\n", ast)?; writeln!(f, "#[allow(non_camel_case_types)]")?; writeln!(f, "struct {};\n", self.name)?; - writeln!(f, "impl actix_web::dev::HttpServiceFactory

for {} {{", self.name)?; - writeln!(f, " fn register(self, config: &mut actix_web::dev::ServiceConfig

) {{")?; + writeln!(f, "impl actix_web::dev::HttpServiceFactory for {} {{", self.name)?; + writeln!(f, " fn register(self, config: &mut actix_web::dev::AppService) {{")?; write!(f, " let scope = actix_web::Scope::new(\"{}\")", self.path)?; for handler in self.scope_items.handlers.iter() { diff --git a/actix-web/src/lib.rs b/actix-web/src/lib.rs index e982a43b1..5f099ae01 100644 --- a/actix-web/src/lib.rs +++ b/actix-web/src/lib.rs @@ -143,5 +143,6 @@ codegen_reexport!(delete); codegen_reexport!(trace); codegen_reexport!(connect); codegen_reexport!(options); +codegen_reexport!(scope); pub(crate) type BoxError = Box;