forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#42033 - oli-obk:suggestions, r=petrochenkov
Change some notes into suggestions r? @petrochenkov since you commented on the same edits in rust-lang#39458
- Loading branch information
Showing
32 changed files
with
392 additions
and
66 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
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
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:41:3 | ||
| | ||
41 | #[attr_proc_macra] | ||
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro` | ||
|
||
error: cannot find attribute macro `FooWithLongNan` in this scope | ||
--> $DIR/resolve-error.rs:45:3 | ||
| | ||
45 | #[FooWithLongNan] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: cannot find derive macro `Dlone` in this scope | ||
--> $DIR/resolve-error.rs:49:10 | ||
| | ||
49 | #[derive(Dlone)] | ||
| ^^^^^ help: try: `Clone` | ||
|
||
error: cannot find derive macro `Dlona` in this scope | ||
--> $DIR/resolve-error.rs:53:10 | ||
| | ||
53 | #[derive(Dlona)] | ||
| ^^^^^ help: try: `Clona` | ||
|
||
error: cannot find derive macro `attr_proc_macra` in this scope | ||
--> $DIR/resolve-error.rs:57:10 | ||
| | ||
57 | #[derive(attr_proc_macra)] | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: cannot find macro `FooWithLongNama!` in this scope | ||
--> $DIR/resolve-error.rs:62:5 | ||
| | ||
62 | FooWithLongNama!(); | ||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam!` | ||
|
||
error: cannot find macro `attr_proc_macra!` in this scope | ||
--> $DIR/resolve-error.rs:65:5 | ||
| | ||
65 | attr_proc_macra!(); | ||
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac!` | ||
|
||
error: cannot find macro `Dlona!` in this scope | ||
--> $DIR/resolve-error.rs:68:5 | ||
| | ||
68 | Dlona!(); | ||
| ^^^^^ | ||
|
||
error: cannot find macro `bang_proc_macrp!` in this scope | ||
--> $DIR/resolve-error.rs:71:5 | ||
| | ||
71 | 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
18 changes: 18 additions & 0 deletions
18
src/test/ui/cast-to-unsized-trait-object-suggestion.stderr
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,18 @@ | ||
error: cast to unsized type: `&{integer}` as `std::marker::Send` | ||
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5 | ||
| | ||
12 | &1 as Send; | ||
| ^^^^^^---- | ||
| | | ||
| help: try casting to a reference instead: `&Send` | ||
|
||
error: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker::Send` | ||
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:14:5 | ||
| | ||
14 | Box::new(1) as Send; | ||
| ^^^^^^^^^^^^^^^---- | ||
| | | ||
| help: try casting to a `Box` instead: `Box<Send>` | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
Oops, something went wrong.