Skip to content

Commit e3b99a1

Browse files
committed
update tests (#91997)
1 parent 6f5d7b3 commit e3b99a1

4 files changed

+34
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
trait MyIterator : Iterator {}
2+
3+
fn main() {
4+
let _ = MyIterator::next;
5+
}
6+
//~^^ ERROR the value of the associated type `Item` in `Iterator` must be specified [E0191]
7+
//~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects]
8+
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
warning: trait objects without an explicit `dyn` are deprecated
2+
--> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13
3+
|
4+
LL | let _ = MyIterator::next;
5+
| ^^^^^^^^^^
6+
|
7+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
8+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
9+
= note: `#[warn(bare_trait_objects)]` on by default
10+
help: if this is an object-safe trait, use `dyn`
11+
|
12+
LL | let _ = <dyn MyIterator>::next;
13+
| ++++ +
14+
15+
error[E0191]: the value of the associated type `Item` in `Iterator` must be specified
16+
--> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13
17+
|
18+
LL | let _ = MyIterator::next;
19+
| ^^^^^^^^^^ help: specify the associated type: `MyIterator::<Item = Type>`
20+
21+
error: aborting due to 1 previous error; 1 warning emitted
22+
23+
For more information about this error, try `rustc --explain E0191`.

tests/ui/issues/issue-23024.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ error[E0191]: the value of the associated type `Output` in `FnOnce` must be spec
2323
--> $DIR/issue-23024.rs:8:39
2424
|
2525
LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
26-
| ^^ help: specify the associated type: `Fn<Output = Type>`
26+
| ^^ help: specify the associated type: `Fn::<Output = Type>`
2727

2828
error: aborting due to 3 previous errors
2929

tests/ui/issues/issue-28344.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ error[E0191]: the value of the associated type `Output` in `BitXor` must be spec
1616
--> $DIR/issue-28344.rs:4:17
1717
|
1818
LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
19-
| ^^^^^^ help: specify the associated type: `BitXor<Output = Type>`
19+
| ^^^^^^ help: specify the associated type: `BitXor::<Output = Type>`
2020

2121
error[E0599]: no function or associated item named `bitor` found for trait object `dyn BitXor<_>` in the current scope
2222
--> $DIR/issue-28344.rs:4:25
@@ -44,7 +44,7 @@ error[E0191]: the value of the associated type `Output` in `BitXor` must be spec
4444
--> $DIR/issue-28344.rs:10:13
4545
|
4646
LL | let g = BitXor::bitor;
47-
| ^^^^^^ help: specify the associated type: `BitXor<Output = Type>`
47+
| ^^^^^^ help: specify the associated type: `BitXor::<Output = Type>`
4848

4949
error[E0599]: no function or associated item named `bitor` found for trait object `dyn BitXor<_>` in the current scope
5050
--> $DIR/issue-28344.rs:10:21

0 commit comments

Comments
 (0)