Commit updated example stderr

This commit is contained in:
scott-linder 2017-06-11 10:49:34 -04:00
parent deef81a3fc
commit c29f5ea83b
2 changed files with 13 additions and 18 deletions

View file

@ -184,7 +184,7 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty) {
if let Some(def_id) = opt_def_id(def) {
if Some(def_id) == cx.tcx.lang_items.owned_box() {
if_let_chain! {[
let &QPath::Resolved(None, ref path) = qpath,
let QPath::Resolved(None, ref path) = *qpath,
let [ref bx] = *path.segments,
let PathParameters::AngleBracketedParameters(ref ab_data) = bx.parameters,
let [ref inner] = *ab_data.types

View file

@ -1,25 +1,20 @@
error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> borrow_box.rs:10:19
|
10 | pub fn test1(foo: &Box<bool>) { //~ ERROR you seem to be trying to use `&Box<T>`
| ^^^^^^^^^^
|
= note: #[deny(borrowed_box)] implied by #[deny(clippy)]
--> borrow_box.rs:9:19
|
9 | pub fn test1(foo: &mut Box<bool>) {
| ^^^^^^^^^^^^^^ help: try `&mut bool`
|
note: lint level defined here
--> borrow_box.rs:4:9
|
4 | #![deny(clippy)]
| ^^^^^^
= help: replace `&Box<T>` with simply `&T`
--> borrow_box.rs:4:9
|
4 | #![deny(borrowed_box)]
| ^^^^^^^^^^^^
error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
--> borrow_box.rs:19:10
--> borrow_box.rs:18:10
|
19 | foo: &'a Box<bool> //~ ERROR you seem to be trying to use `&Box<T>`
| ^^^^^^^^^^^^^
|
= note: #[deny(borrowed_box)] implied by #[deny(clippy)]
= help: replace `&Box<T>` with simply `&T`
18 | foo: &'a Box<bool>
| ^^^^^^^^^^^^^ help: try `&'a bool`
error: aborting due to previous error(s)