forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#101396 - matthiaskrgr:rollup-9n0257m, r=matth…
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#100302 (Suggest associated method on deref types when path syntax method fails) - rust-lang#100647 ( Make trait bound not satisfied specify kind) - rust-lang#101349 (rustdoc: remove `.impl-items { flex-basis }` CSS, not in flex container) - rust-lang#101369 (Fix `global_asm` macro pretty printing) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
25 changed files
with
205 additions
and
45 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 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,3 @@ | ||
// check-pass | ||
// compile-flags: -Zunpretty=expanded | ||
core::arch::global_asm!("x: .byte 42"); |
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,9 @@ | ||
#![feature(prelude_import)] | ||
#![no_std] | ||
#[prelude_import] | ||
use ::std::prelude::rust_2015::*; | ||
#[macro_use] | ||
extern crate std; | ||
// check-pass | ||
// compile-flags: -Zunpretty=expanded | ||
global_asm! ("x: .byte 42"); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
struct Argument; | ||
struct Return; | ||
|
||
fn function(_: Argument) -> Return { todo!() } | ||
|
||
trait Trait {} | ||
impl Trait for fn(Argument) -> Return {} | ||
|
||
fn takes(_: impl Trait) {} | ||
|
||
fn main() { | ||
takes(function); | ||
//~^ ERROR the trait bound | ||
takes(|_: Argument| -> Return { todo!() }); | ||
//~^ ERROR the trait bound | ||
} |
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,33 @@ | ||
error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied | ||
--> $DIR/issue-99875.rs:12:11 | ||
| | ||
LL | takes(function); | ||
| ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}` | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return` | ||
note: required by a bound in `takes` | ||
--> $DIR/issue-99875.rs:9:18 | ||
| | ||
LL | fn takes(_: impl Trait) {} | ||
| ^^^^^ required by this bound in `takes` | ||
|
||
error[E0277]: the trait bound `[closure@$DIR/issue-99875.rs:14:11: 14:34]: Trait` is not satisfied | ||
--> $DIR/issue-99875.rs:14:11 | ||
| | ||
LL | takes(|_: Argument| -> Return { todo!() }); | ||
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `[closure@$DIR/issue-99875.rs:14:11: 14:34]` | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return` | ||
note: required by a bound in `takes` | ||
--> $DIR/issue-99875.rs:9:18 | ||
| | ||
LL | fn takes(_: impl Trait) {} | ||
| ^^^^^ required by this bound in `takes` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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.