path trimming: ignore type aliases
This commit is contained in:
parent
cfba499271
commit
eaefe4a230
79 changed files with 192 additions and 191 deletions
|
|
@ -4,10 +4,10 @@ error[E0308]: mismatched types
|
|||
LL | match a {
|
||||
| - this expression has type `Option<Box<{integer}>>`
|
||||
LL | Ok(a) =>
|
||||
| ^^^^^ expected enum `Option`, found enum `std::result::Result`
|
||||
| ^^^^^ expected enum `Option`, found enum `Result`
|
||||
|
|
||||
= note: expected enum `Option<Box<{integer}>>`
|
||||
found enum `std::result::Result<_, _>`
|
||||
found enum `Result<_, _>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,23 +2,23 @@ error[E0308]: mismatched types
|
|||
--> $DIR/issue-12552.rs:6:5
|
||||
|
|
||||
LL | match t {
|
||||
| - this expression has type `std::result::Result<_, {integer}>`
|
||||
| - this expression has type `Result<_, {integer}>`
|
||||
LL | Some(k) => match k {
|
||||
| ^^^^^^^ expected enum `std::result::Result`, found enum `Option`
|
||||
| ^^^^^^^ expected enum `Result`, found enum `Option`
|
||||
|
|
||||
= note: expected enum `std::result::Result<_, {integer}>`
|
||||
= note: expected enum `Result<_, {integer}>`
|
||||
found enum `Option<_>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-12552.rs:9:5
|
||||
|
|
||||
LL | match t {
|
||||
| - this expression has type `std::result::Result<_, {integer}>`
|
||||
| - this expression has type `Result<_, {integer}>`
|
||||
...
|
||||
LL | None => ()
|
||||
| ^^^^ expected enum `std::result::Result`, found enum `Option`
|
||||
| ^^^^ expected enum `Result`, found enum `Option`
|
||||
|
|
||||
= note: expected enum `std::result::Result<_, {integer}>`
|
||||
= note: expected enum `Result<_, {integer}>`
|
||||
found enum `Option<_>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ pub fn main() {
|
|||
Ok(u) => u,
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected enum `Option<{integer}>`
|
||||
//~| found enum `std::result::Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `std::result::Result`
|
||||
//~| found enum `Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `Result`
|
||||
|
||||
Err(e) => panic!(e)
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected enum `Option<{integer}>`
|
||||
//~| found enum `std::result::Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `std::result::Result`
|
||||
//~| found enum `Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `Result`
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ error[E0308]: mismatched types
|
|||
LL | let _x: usize = match Some(1) {
|
||||
| ------- this expression has type `Option<{integer}>`
|
||||
LL | Ok(u) => u,
|
||||
| ^^^^^ expected enum `Option`, found enum `std::result::Result`
|
||||
| ^^^^^ expected enum `Option`, found enum `Result`
|
||||
|
|
||||
= note: expected enum `Option<{integer}>`
|
||||
found enum `std::result::Result<_, _>`
|
||||
found enum `Result<_, _>`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-13466.rs:14:9
|
||||
|
|
@ -16,10 +16,10 @@ LL | let _x: usize = match Some(1) {
|
|||
| ------- this expression has type `Option<{integer}>`
|
||||
...
|
||||
LL | Err(e) => panic!(e)
|
||||
| ^^^^^^ expected enum `Option`, found enum `std::result::Result`
|
||||
| ^^^^^^ expected enum `Option`, found enum `Result`
|
||||
|
|
||||
= note: expected enum `Option<{integer}>`
|
||||
found enum `std::result::Result<_, _>`
|
||||
found enum `Result<_, _>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ impl Iterator for S {
|
|||
type Item = i32;
|
||||
fn next(&mut self) -> Result<i32, i32> { Ok(7) }
|
||||
//~^ ERROR method `next` has an incompatible type for trait
|
||||
//~| expected enum `Option`, found enum `std::result::Result`
|
||||
//~| expected enum `Option`, found enum `Result`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ error[E0053]: method `next` has an incompatible type for trait
|
|||
--> $DIR/issue-21332.rs:5:5
|
||||
|
|
||||
LL | fn next(&mut self) -> Result<i32, i32> { Ok(7) }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `std::result::Result`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `Result`
|
||||
|
|
||||
= note: expected fn pointer `fn(&mut S) -> Option<i32>`
|
||||
found fn pointer `fn(&mut S) -> std::result::Result<i32, i32>`
|
||||
found fn pointer `fn(&mut S) -> Result<i32, i32>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ fn main() {
|
|||
Err(_) => ()
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected enum `Option<_>`
|
||||
//~| found enum `std::result::Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `std::result::Result`
|
||||
//~| found enum `Result<_, _>`
|
||||
//~| expected enum `Option`, found enum `Result`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ error[E0308]: mismatched types
|
|||
LL | match None {
|
||||
| ---- this expression has type `Option<_>`
|
||||
LL | Err(_) => ()
|
||||
| ^^^^^^ expected enum `Option`, found enum `std::result::Result`
|
||||
| ^^^^^^ expected enum `Option`, found enum `Result`
|
||||
|
|
||||
= note: expected enum `Option<_>`
|
||||
found enum `std::result::Result<_, _>`
|
||||
found enum `Result<_, _>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error[E0599]: the method `as_deref` exists for enum `std::result::Result<{integer}, _>`, but its trait bounds were not satisfied
|
||||
error[E0599]: the method `as_deref` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied
|
||||
--> $DIR/result-as_deref.rs:2:27
|
||||
|
|
||||
LL | let _result = &Ok(42).as_deref();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0599]: the method `as_deref_mut` exists for enum `std::result::Result<{integer}, _>`, but its trait bounds were not satisfied
|
||||
error[E0599]: the method `as_deref_mut` exists for enum `Result<{integer}, _>`, but its trait bounds were not satisfied
|
||||
--> $DIR/result-as_deref_mut.rs:2:31
|
||||
|
|
||||
LL | let _result = &mut Ok(42).as_deref_mut();
|
||||
| ^^^^^^^^^^^^ method cannot be called on `std::result::Result<{integer}, _>` due to unsatisfied trait bounds
|
||||
| ^^^^^^^^^^^^ method cannot be called on `Result<{integer}, _>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`{integer}: DerefMut`
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ error[E0308]: try expression alternatives have incompatible types
|
|||
--> $DIR/issue-51632-try-desugar-incompatible-types.rs:8:5
|
||||
|
|
||||
LL | missing_discourses()?
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `isize`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `isize`
|
||||
|
|
||||
= note: expected enum `std::result::Result<isize, ()>`
|
||||
= note: expected enum `Result<isize, ()>`
|
||||
found type `isize`
|
||||
help: try removing this `?`
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ error[E0308]: mismatched types
|
|||
--> $DIR/issue-6458-4.rs:1:20
|
||||
|
|
||||
LL | fn foo(b: bool) -> Result<bool,String> {
|
||||
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
|
||||
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
|
||||
| |
|
||||
| implicitly returns `()` as its body has no tail or `return` expression
|
||||
LL | Err("bar".to_string());
|
||||
| - help: consider removing this semicolon
|
||||
|
|
||||
= note: expected enum `std::result::Result<bool, String>`
|
||||
= note: expected enum `Result<bool, String>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue