New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
23 lines
904 B
Plaintext
23 lines
904 B
Plaintext
error[E0557]: feature has been removed
|
|
--> $DIR/const-trait-impl-parameter-mismatch.rs:10:30
|
|
|
|
|
LL | #![feature(const_trait_impl, effects)]
|
|
| ^^^^^^^ feature has been removed
|
|
|
|
|
= note: removed in 1.84.0; see <https://github.com/rust-lang/rust/pull/132479> for more information
|
|
= note: removed, redundant with `#![feature(const_trait_impl)]`
|
|
|
|
error[E0049]: associated function `compute` has 0 type parameters but its trait declaration has 1 type parameter
|
|
--> $DIR/const-trait-impl-parameter-mismatch.rs:19:16
|
|
|
|
|
LL | fn compute<T: [const] Aux>() -> u32;
|
|
| - expected 1 type parameter
|
|
...
|
|
LL | fn compute<'x>() -> u32 {
|
|
| ^^ found 0 type parameters
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0049, E0557.
|
|
For more information about an error, try `rustc --explain E0049`.
|