Files
rust/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2.8 KiB
Plaintext
Raw Normal View History

2024-06-21 12:22:29 +00:00
warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/no-explicit-const-params.rs:1:30
|
LL | #![feature(const_trait_impl, effects)]
| ^^^^^^^
|
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default
2024-06-30 17:08:45 +00:00
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
2023-10-25 15:28:23 +00:00
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:22:5
|
LL | foo::<false>();
| ^^^ expected 0 generic arguments
2023-10-25 15:28:23 +00:00
|
note: function defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:3:10
|
LL | const fn foo() {}
| ^^^
2024-07-05 01:28:24 +00:00
help: remove the unnecessary generics
|
LL - foo::<false>();
LL + foo();
|
2023-10-25 15:28:23 +00:00
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:24:12
|
LL | <() as Bar<false>>::bar();
2024-06-25 09:50:01 +00:00
| ^^^ expected 0 generic arguments
2023-10-25 15:28:23 +00:00
|
note: trait defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:6:7
|
LL | trait Bar {
| ^^^
2024-06-25 09:50:01 +00:00
help: replace the generic bound with the associated type
|
LL | <() as Bar< = false>>::bar();
| +
2023-10-25 15:28:23 +00:00
error[E0308]: mismatched types
--> $DIR/no-explicit-const-params.rs:24:5
|
LL | <() as Bar<false>>::bar();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
|
= note: expected constant `false`
found constant `true`
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:15:5
|
LL | foo::<true>();
| ^^^ expected 0 generic arguments
2023-10-25 15:28:23 +00:00
|
note: function defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:3:10
|
LL | const fn foo() {}
| ^^^
2024-07-05 01:28:24 +00:00
help: remove the unnecessary generics
|
LL - foo::<true>();
LL + foo();
|
2023-10-25 15:28:23 +00:00
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:17:12
|
LL | <() as Bar<true>>::bar();
2024-06-25 09:50:01 +00:00
| ^^^ expected 0 generic arguments
2023-10-25 15:28:23 +00:00
|
note: trait defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:6:7
|
LL | trait Bar {
| ^^^
2024-06-25 09:50:01 +00:00
help: replace the generic bound with the associated type
|
LL | <() as Bar< = true>>::bar();
| +
2023-10-25 15:28:23 +00:00
2024-06-30 17:08:45 +00:00
error: aborting due to 6 previous errors; 1 warning emitted
2023-10-25 15:28:23 +00:00
Some errors have detailed explanations: E0107, E0308.
For more information about an error, try `rustc --explain E0107`.