Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ui tests #182

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/ui/pin_project/safe_packed_borrows.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: borrow of packed field is unsafe and requires unsafe function or block (e
17 | &a.field; //~ ERROR borrow of packed field is unsafe and requires unsafe function or block
| ^^^^^^^^
|
note: lint level defined here
note: the lint level is defined here
--> $DIR/safe_packed_borrows.rs:1:9
|
1 | #![deny(safe_packed_borrows)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// NB: If you change this test, change 'overlapping_marker_traits-feature-gate.rs' at the same time.

// This feature could break the guarantee for Unpin provided by pin-project,
// but was removed in https://github.com/rust-lang/rust/pull/68544 (nightly-2020-02-06).
// Refs:
// * https://github.com/rust-lang/rust/issues/29864#issuecomment-515780867.
// * https://github.com/taiki-e/pin-project/issues/105

// overlapping_marker_traits
// Tracking issue: https://github.com/rust-lang/rust/issues/29864
#![feature(overlapping_marker_traits)]

// See https://github.com/rust-lang/rust/issues/29864#issuecomment-515780867.

use pin_project::pin_project;
use std::marker::PhantomPinned;

Expand Down
16 changes: 16 additions & 0 deletions tests/ui/unstable-features/overlapping_marker_traits.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
error[E0557]: feature has been removed
--> $DIR/overlapping_marker_traits.rs:11:12
|
11 | #![feature(overlapping_marker_traits)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
|
= note: removed in favor of `#![feature(marker_trait_attr)]`

error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Foo<_>`:
--> $DIR/overlapping_marker_traits.rs:16:1
|
16 | #[pin_project]
| ^^^^^^^^^^^^^^ conflicting implementation for `Foo<_>`
...
23 | impl<T> Unpin for Foo<T> {}
| ------------------------ first implementation here
4 changes: 2 additions & 2 deletions tests/ui/unstable-features/trivial_bounds-bug.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied
--> $DIR/trivial_bounds-bug.rs:13:5
--> $DIR/trivial_bounds-bug.rs:13:43
|
13 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `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>
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/unstable-features/trivial_bounds-feature-gate.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` i
= help: see issue #48214
= help: add `#![feature(trivial_bounds)]` to the crate attributes to enable

error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied
--> $DIR/trivial_bounds-feature-gate.rs:8:43
|
8 | impl Unpin for A where PhantomPinned: Unpin {} //~ ERROR E0277
| ^^^^^ 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 by `std::marker::Unpin`

error[E0277]: the trait bound `std::marker::PhantomPinned: std::marker::Unpin` is not satisfied
--> $DIR/trivial_bounds-feature-gate.rs:16:5
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/unstable-features/trivial_bounds.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: Trait bound inner::Inner: std::marker::Unpin does not depend on any type
15 | impl Unpin for A where Inner: Unpin {} //~ ERROR std::marker::Unpin does not depend on any type or lifetime parameters
| ^^^^^
|
note: lint level defined here
note: the lint level is defined here
--> $DIR/trivial_bounds.rs:6:9
|
6 | #![deny(trivial_bounds)]
Expand Down