-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for lack of suggestion in stable
This test will break when `Step` gets stabilized, but punt until then.
- Loading branch information
Showing
5 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pub fn baz<T>(t: std::ops::Range<T>) { | ||
for _ in t {} | ||
} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//@ only-linux | ||
//@ ignore-wasm32 | ||
//@ ignore-wasm64 | ||
// ignore-tidy-linelength | ||
|
||
// Ensure that on stable we don't suggest restricting with an unsafe trait and we continue | ||
// mentioning the rest of the obligation chain. | ||
|
||
use run_make_support::{rust_lib_name, rustc}; | ||
|
||
fn main() { | ||
rustc() | ||
.env("RUSTC_BOOTSTRAP", "-1") | ||
.input("missing-bound.rs") | ||
.run_fail() | ||
.assert_stderr_not_contains("help: consider restricting type parameter `T`") | ||
.assert_stderr_contains( | ||
r#" | ||
= note: required for `std::ops::Range<T>` to implement `Iterator` | ||
= note: required for `std::ops::Range<T>` to implement `IntoIterator`"#, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters