diff options
| author | bors <bors@rust-lang.org> | 2025-08-19 14:43:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-19 14:43:48 +0000 |
| commit | 16ad385579cebb6f7d53367c552661b6b51a4a02 (patch) | |
| tree | 9127978a6da3066df8319d286ccfa6ec8451b969 /tests/ui/generics/duplicate-generic-parameter-error-86756.stderr | |
| parent | 8c32e313cccf7df531e2d49ffb8227bb92304aee (diff) | |
| parent | 5d37e8e707e74a0820e1171f200d45fd2b8fa13c (diff) | |
| download | rust-16ad385579cebb6f7d53367c552661b6b51a4a02.tar.gz rust-16ad385579cebb6f7d53367c552661b6b51a4a02.zip | |
Auto merge of #145599 - jieyouxu:rollup-523cxhm, r=jieyouxu
Rollup of 15 pull requests Successful merges: - rust-lang/rust#139345 (Extend `QueryStability` to handle `IntoIterator` implementations) - rust-lang/rust#140740 (Add `-Zindirect-branch-cs-prefix`) - rust-lang/rust#142079 (nll-relate: improve hr opaque types support) - rust-lang/rust#142938 (implement std::fs::set_permissions_nofollow on unix) - rust-lang/rust#143730 (fmt of non-decimal radix untangled) - rust-lang/rust#144767 (Correct some grammar in integer documentation) - rust-lang/rust#144906 (Require approval from t-infra instead of t-release on tier bumps) - rust-lang/rust#144983 (Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#145025 (run spellcheck as a tidy extra check in ci) - rust-lang/rust#145099 (rustc_target: Add the `32s` target feature for LoongArch) - rust-lang/rust#145166 (suggest using `pub(crate)` for E0364) - rust-lang/rust#145255 (dec2flt: Provide more valid inputs examples) - rust-lang/rust#145306 (Add tracing to various miscellaneous functions) - rust-lang/rust#145336 (Hide docs for `core::unicode`) - rust-lang/rust#145585 (Miri: fix handling of in-place argument and return place handling) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/generics/duplicate-generic-parameter-error-86756.stderr')
| -rw-r--r-- | tests/ui/generics/duplicate-generic-parameter-error-86756.stderr | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr b/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr new file mode 100644 index 00000000000..d4b2169ffd2 --- /dev/null +++ b/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr @@ -0,0 +1,48 @@ +error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters + --> $DIR/duplicate-generic-parameter-error-86756.rs:3:14 + | +LL | trait Foo<T, T = T> {} + | - ^ already used + | | + | first use of `T` + +error[E0412]: cannot find type `dyn` in this scope + --> $DIR/duplicate-generic-parameter-error-86756.rs:7:10 + | +LL | eq::<dyn, Foo> + | ^^^ not found in this scope + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/duplicate-generic-parameter-error-86756.rs:7:15 + | +LL | eq::<dyn, Foo> + | ^^^ + | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! + = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/warnings-promoted-to-error.html> + = note: `#[warn(bare_trait_objects)]` on by default +help: if this is a dyn-compatible trait, use `dyn` + | +LL | eq::<dyn, dyn Foo> + | +++ + +error[E0107]: missing generics for trait `Foo` + --> $DIR/duplicate-generic-parameter-error-86756.rs:7:15 + | +LL | eq::<dyn, Foo> + | ^^^ expected at least 1 generic argument + | +note: trait defined here, with at least 1 generic parameter: `T` + --> $DIR/duplicate-generic-parameter-error-86756.rs:3:7 + | +LL | trait Foo<T, T = T> {} + | ^^^ - +help: add missing generic argument + | +LL | eq::<dyn, Foo<T>> + | +++ + +error: aborting due to 3 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0107, E0403, E0412. +For more information about an error, try `rustc --explain E0107`. |
