Page MenuHomeDevCentral

Can't compile Limiting Factor / Rocket 0.4 on current nightly
Open, HighPublic

Description

$ rustc -V
rustc 1.92.0-nightly (dd7fda570 2025-09-20)

$ cargo build
   Compiling devise_core v0.2.1
error[E0557]: feature has been removed
 --> /home/dereckson/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/devise_core-0.2.1/src/lib.rs:2:12
  |
2 | #![feature(concat_idents)]
  |            ^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in 1.90.0; see <https://github.com/rust-lang/rust/pull/142704> for more information
  = note: use the `${concat(..)}` metavariable expression instead

error: cannot find macro `concat_idents` in this scope
   --> /home/dereckson/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/devise_core-0.2.1/src/generator.rs:29:39
    |
 29 |               $(self.$vec.push(Box::new(concat_idents!(default_, $get_f)));)*
    |                                         ^^^^^^^^^^^^^
...
193 | /     mappers! {
194 | |         (map_struct, try_map_struct, struct_mapper): Struct, struct_mappers,
195 | |         (map_enum, try_map_enum, enum_mapper): Enum, enum_mappers,
196 | |         (map_variant, try_map_variant, variant_mapper): Variant, variant_mappers,
197 | |         (map_fields, try_map_fields, fields_mapper): Fields, fields_mappers,
198 | |         (map_field, try_map_field, field_mapper): Field, field_mappers
199 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in the macro `mappers` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0557`.
error: could not compile `devise_core` (lib) due to 2 previous errors

Event Timeline

dereckson triaged this task as High priority.Mon, Sep 22, 00:32
dereckson created this task.

Current mitigation plan is to port our Rocket applications to Axum.

Dichotomic search of last nightly version able to build Rocket

We can compile Rocket 0.4 with 1.85.0-nightly (0aeaa5eb2 2024-12-14):
rustup override set nightly-2024-12-15

Future plan for Limiting Factor

Plan is to:

  • adapt Jenkinsfile in rLF to use that toolchain
  • prepare a new structure for the Limiting Factor with a workspace and several crates
    • the current code go to rocket-legacy/
    • we can add afterwards a core/ directory for common bricks as limiting-factor-core crate
    • a new axum/ directory will contain the crate limiting-factor-axum
dereckson renamed this task from Can't compile Limiting Factor on current nightly to Can't compile Limiting Factor / Rocket 0.4 on current nightly.Tue, Sep 23, 17:24

Issues reported upstream

BugSummary of the issueOccurs on nightly from
#2964concat_idents! has been removed2025-06-23
#2965default to_string specializes an item from a parent impl2024-12-16

What about Rocket limiting-factor crate?

Not sure how we want to exactly proceed for the limiting-factor crate for legacy Rocket:

  • our new APIs have been migrated to axum
  • rLF received support for axum framework, limited to what's needed for the migration
    • into_json_response()
    • RequestBody extractor adapted from the guard
  • some of the code from limiting-factor 0.8 has been migrated to
  • we could release 0.8.1, built on nightly-2024-12-15, we already documented that toolchain in README
  • if we publish 0.8.1, we break things like docs.rs etc.