[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge #12
Browse files Browse the repository at this point in the history
12: Update ui tests r=taiki-e a=taiki-e



Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e committed Apr 20, 2020
2 parents 6e7990e + 81db656 commit fdcd36c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 35 deletions.
2 changes: 1 addition & 1 deletion tests/ui/conflict-drop.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ error[E0119]: conflicting implementations of trait `_::MustNotImplDrop` for type
| |_first implementation here
| conflicting implementation for `Foo<_, _>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
6 changes: 3 additions & 3 deletions tests/ui/conflict-unpin.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
14 | impl<T, U> Unpin for Foo<T, U> where T: Unpin {} // Conditional Unpin impl
| --------------------------------------------- first implementation here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Bar<_, _>`:
--> $DIR/conflict-unpin.rs:18:1
Expand All @@ -30,7 +30,7 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
27 | impl<T, U> Unpin for Bar<T, U> {} // Non-conditional Unpin impl
| ------------------------------ first implementation here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Baz<_, _>`:
--> $DIR/conflict-unpin.rs:29:1
Expand All @@ -47,4 +47,4 @@ error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type
38 | impl<T: Unpin, U: Unpin> Unpin for Baz<T, U> {} // Conditional Unpin impl
| -------------------------------------------- first implementation here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
5 changes: 2 additions & 3 deletions tests/ui/invalid-bounds.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ error: expected one of `+`, `,`, `=`, or `>`, found `:`
13 | | }
| | ^
| | |
| | expected one of `+`, `,`, `=`, or `>`
| |_unexpected token
| |_expected one of `+`, `,`, `=`, or `>`
| in this macro invocation
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
12 changes: 2 additions & 10 deletions tests/ui/overlapping_lifetime_names.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ error[E0263]: lifetime name `'__pin` declared twice in the same scope
7 | | }
8 | | }
| |_- previous declaration here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0263]: lifetime name `'__pin` declared twice in the same scope
--> $DIR/overlapping_lifetime_names.rs:4:20
Expand All @@ -23,8 +21,6 @@ error[E0263]: lifetime name `'__pin` declared twice in the same scope
7 | | }
8 | | }
| |_- previous declaration here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope
--> $DIR/overlapping_lifetime_names.rs:3:1
Expand All @@ -38,7 +34,7 @@ error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in
8 | | }
| |_^ lifetime '__pin already in scope
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope
--> $DIR/overlapping_lifetime_names.rs:3:1
Expand All @@ -52,7 +48,7 @@ error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in
8 | | }
| |_^ lifetime '__pin already in scope
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0263]: lifetime name `'__pin` declared twice in the same scope
--> $DIR/overlapping_lifetime_names.rs:4:20
Expand All @@ -65,8 +61,6 @@ error[E0263]: lifetime name `'__pin` declared twice in the same scope
7 | | }
8 | | }
| |_- previous declaration here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0263]: lifetime name `'__pin` declared twice in the same scope
--> $DIR/overlapping_lifetime_names.rs:4:20
Expand All @@ -79,5 +73,3 @@ error[E0263]: lifetime name `'__pin` declared twice in the same scope
7 | | }
8 | | }
| |_- previous declaration here
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
6 changes: 2 additions & 4 deletions tests/ui/overlapping_unpin_struct.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `_::__Origin<'_, std::marker::PhantomPinned>`
error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
--> $DIR/overlapping_unpin_struct.rs:18:5
|
15 | fn is_unpin<T: Unpin>() {}
| -------- ----- required by this bound in `is_unpin`
| ----- required by this bound in `is_unpin`
...
18 | is_unpin::<Foo<PhantomPinned>>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, std::marker::PhantomPinned>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
|
= help: the following implementations were found:
<std::marker::PhantomPinned as std::marker::Unpin>
= note: required because it appears within the type `_::__Origin<'_, std::marker::PhantomPinned>`
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<std::marker::PhantomPinned>`
4 changes: 2 additions & 2 deletions tests/ui/packed.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ note: the lint level is defined here
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: borrow of packed field is unsafe and requires unsafe function or block (error E0133)
--> $DIR/packed.rs:11:1
Expand Down Expand Up @@ -52,4 +52,4 @@ note: the lint level is defined here
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
= note: fields of packed structs might be misaligned: dereferencing a misaligned pointer or even just creating a misaligned reference is undefined behavior
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
18 changes: 6 additions & 12 deletions tests/ui/proper_unpin.stderr
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `_::__Origin<'_, std::marker::PhantomPinned, ()>`
error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
--> $DIR/proper_unpin.rs:34:5
|
31 | fn is_unpin<T: Unpin>() {}
| -------- ----- required by this bound in `is_unpin`
| ----- required by this bound in `is_unpin`
...
34 | is_unpin::<Foo<PhantomPinned, ()>>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, std::marker::PhantomPinned, ()>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
|
= help: the following implementations were found:
<std::marker::PhantomPinned as std::marker::Unpin>
= note: required because it appears within the type `Inner<std::marker::PhantomPinned>`
= note: required because it appears within the type `_::__Origin<'_, std::marker::PhantomPinned, ()>`
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<std::marker::PhantomPinned, ()>`

error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `_::__Origin<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`
error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
--> $DIR/proper_unpin.rs:36:5
|
31 | fn is_unpin<T: Unpin>() {}
| -------- ----- required by this bound in `is_unpin`
| ----- required by this bound in `is_unpin`
...
36 | is_unpin::<Foo<PhantomPinned, PhantomPinned>>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
|
= help: the following implementations were found:
<std::marker::PhantomPinned as std::marker::Unpin>
= note: required because it appears within the type `Inner<std::marker::PhantomPinned>`
= note: required because it appears within the type `_::__Origin<'_, std::marker::PhantomPinned, std::marker::PhantomPinned>`
= note: required because of the requirements on the impl of `std::marker::Unpin` for `Foo<std::marker::PhantomPinned, std::marker::PhantomPinned>`

error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied in `_::__Origin<'_>`
error[E0277]: `std::marker::PhantomPinned` cannot be unpinned
--> $DIR/proper_unpin.rs:38:5
|
31 | fn is_unpin<T: Unpin>() {}
| -------- ----- required by this bound in `is_unpin`
| ----- required by this bound in `is_unpin`
...
38 | is_unpin::<TrivialBounds>(); //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_>`, the trait `std::marker::Unpin` is not implemented for `std::marker::PhantomPinned`
|
= help: the following implementations were found:
<std::marker::PhantomPinned as std::marker::Unpin>
= note: required because it appears within the type `_::__Origin<'_>`
= note: required because of the requirements on the impl of `std::marker::Unpin` for `TrivialBounds`

0 comments on commit fdcd36c

Please sign in to comment.