-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Change some notes into suggestions #42033
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,23 @@ | ||
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// force-host | ||
// no-prefer-dynamic | ||
#![feature(proc_macro)] | ||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro_attribute] | ||
pub fn attr_proc_macro(_: TokenStream, input: TokenStream) -> TokenStream { | ||
input | ||
} |
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,23 @@ | ||
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// force-host | ||
// no-prefer-dynamic | ||
#![feature(proc_macro)] | ||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro] | ||
pub fn bang_proc_macro(input: TokenStream) -> TokenStream { | ||
input | ||
} |
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,23 @@ | ||
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// force-host | ||
// no-prefer-dynamic | ||
|
||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro_derive(Clona)] | ||
pub fn derive_clonea(input: TokenStream) -> TokenStream { | ||
"".parse().unwrap() | ||
} |
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,23 @@ | ||
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// force-host | ||
// no-prefer-dynamic | ||
|
||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro_derive(FooWithLongName)] | ||
pub fn derive_foo(input: TokenStream) -> TokenStream { | ||
"".parse().unwrap() | ||
} |
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 |
---|---|---|
|
@@ -35,46 +35,29 @@ macro_rules! attr_proc_mac { | |
} | ||
|
||
#[derive(FooWithLongNan)] | ||
//~^ ERROR cannot find derive macro `FooWithLongNan` in this scope | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's better to keep these annotations. |
||
//~^^ HELP did you mean `FooWithLongName`? | ||
struct Foo; | ||
|
||
#[attr_proc_macra] | ||
//~^ ERROR cannot find attribute macro `attr_proc_macra` in this scope | ||
//~^^ HELP did you mean `attr_proc_macro`? | ||
struct Bar; | ||
|
||
#[FooWithLongNan] | ||
//~^ ERROR cannot find attribute macro `FooWithLongNan` in this scope | ||
struct Asdf; | ||
|
||
#[derive(Dlone)] | ||
//~^ ERROR cannot find derive macro `Dlone` in this scope | ||
//~^^ HELP did you mean `Clone`? | ||
struct A; | ||
|
||
#[derive(Dlona)] | ||
//~^ ERROR cannot find derive macro `Dlona` in this scope | ||
//~^^ HELP did you mean `Clona`? | ||
struct B; | ||
|
||
#[derive(attr_proc_macra)] | ||
//~^ ERROR cannot find derive macro `attr_proc_macra` in this scope | ||
struct C; | ||
|
||
fn main() { | ||
FooWithLongNama!(); | ||
//~^ ERROR cannot find macro `FooWithLongNama!` in this scope | ||
//~^^ HELP did you mean `FooWithLongNam!`? | ||
|
||
attr_proc_macra!(); | ||
//~^ ERROR cannot find macro `attr_proc_macra!` in this scope | ||
//~^^ HELP did you mean `attr_proc_mac!`? | ||
|
||
Dlona!(); | ||
//~^ ERROR cannot find macro `Dlona!` in this scope | ||
|
||
bang_proc_macrp!(); | ||
//~^ ERROR cannot find macro `bang_proc_macrp!` in this scope | ||
//~^^ HELP did you mean `bang_proc_macro!`? | ||
} |
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,62 @@ | ||
error: cannot find derive macro `FooWithLongNan` in this scope | ||
--> $DIR/resolve-error.rs:37:10 | ||
| | ||
37 | #[derive(FooWithLongNan)] | ||
| ^^^^^^^^^^^^^^ help: try: `FooWithLongName` | ||
|
||
error: cannot find attribute macro `attr_proc_macra` in this scope | ||
--> $DIR/resolve-error.rs:40:3 | ||
| | ||
40 | #[attr_proc_macra] | ||
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro` | ||
|
||
error: cannot find attribute macro `FooWithLongNan` in this scope | ||
--> $DIR/resolve-error.rs:43:3 | ||
| | ||
43 | #[FooWithLongNan] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: cannot find derive macro `Dlone` in this scope | ||
--> $DIR/resolve-error.rs:46:10 | ||
| | ||
46 | #[derive(Dlone)] | ||
| ^^^^^ help: try: `Clone` | ||
|
||
error: cannot find derive macro `Dlona` in this scope | ||
--> $DIR/resolve-error.rs:49:10 | ||
| | ||
49 | #[derive(Dlona)] | ||
| ^^^^^ help: try: `Clona` | ||
|
||
error: cannot find derive macro `attr_proc_macra` in this scope | ||
--> $DIR/resolve-error.rs:52:10 | ||
| | ||
52 | #[derive(attr_proc_macra)] | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: cannot find macro `FooWithLongNama!` in this scope | ||
--> $DIR/resolve-error.rs:56:5 | ||
| | ||
56 | FooWithLongNama!(); | ||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam!` | ||
|
||
error: cannot find macro `attr_proc_macra!` in this scope | ||
--> $DIR/resolve-error.rs:58:5 | ||
| | ||
58 | attr_proc_macra!(); | ||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac!` | ||
|
||
error: cannot find macro `Dlona!` in this scope | ||
--> $DIR/resolve-error.rs:60:5 | ||
| | ||
60 | Dlona!(); | ||
| ^^^^^ | ||
|
||
error: cannot find macro `bang_proc_macrp!` in this scope | ||
--> $DIR/resolve-error.rs:62:5 | ||
| | ||
62 | bang_proc_macrp!(); | ||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro!` | ||
|
||
error: aborting due to 10 previous errors | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some guidelines for suggestion messages. This way we can keep appending the suggestion at the end. I like this solution, because it's easy to read on the command line, requires little effort from suggestion authors and works well with non-label suggestions and json output.