forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#132152 - lqd:revert-127731, r=compiler-errors
Revert rust-lang#127731 "Emit error when calling/declaring functions with unavailable …" This reverts rust-lang#127731 due to the unexpected [perf regressions](rust-lang#127731 (comment)) and to give time to mitigate the regressions before re-landing it. r? `@RalfJung` cc `@veluca93`
- Loading branch information
Showing
16 changed files
with
53 additions
and
448 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
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 was deleted.
Oops, something went wrong.
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
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,40 @@ | ||
//@ known-bug: #131342 | ||
// see also: 131342.rs | ||
|
||
fn main() { | ||
problem_thingy(Once); | ||
} | ||
|
||
struct Once; | ||
|
||
impl Iterator for Once { | ||
type Item = (); | ||
} | ||
|
||
fn problem_thingy(items: impl Iterator) { | ||
let peeker = items.peekable(); | ||
problem_thingy(&peeker); | ||
} | ||
|
||
trait Iterator { | ||
type Item; | ||
|
||
fn peekable(self) -> Peekable<Self> | ||
where | ||
Self: Sized, | ||
{ | ||
loop {} | ||
} | ||
} | ||
|
||
struct Peekable<I: Iterator> { | ||
_peeked: I::Item, | ||
} | ||
|
||
impl<I: Iterator> Iterator for Peekable<I> { | ||
type Item = I::Item; | ||
} | ||
|
||
impl<I: Iterator + ?Sized> Iterator for &I { | ||
type Item = I::Item; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//@ known-bug: #131342 | ||
// see also: 131342-2.rs | ||
|
||
fn main() { | ||
let mut items = vec![1, 2, 3, 4, 5].into_iter(); | ||
|
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
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
Oops, something went wrong.