Skip to content

Commit 5cf6b02

Browse files
committed
fix typo for copyright year and trait capitalise
1 parent 1e39d9b commit 5cf6b02

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
23672367
maybe_qself.is_none() &&
23682368
path.segments[0].identifier.name == self_type_name;
23692369
let msg = if is_invalid_self_type_name {
2370-
"use of Self outside of an impl".to_string()
2370+
"use of `Self` outside of an impl or trait".to_string()
23712371
} else {
23722372
format!("use of undeclared {} `{}`",
23732373
kind, path_names_to_string(path, 0))

src/test/compile-fail/issue-24968.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn foo(_: Self) {
12+
//~^ ERROR use of `Self` outside of an impl or Trait
13+
}
14+
15+
fn main() {}

0 commit comments

Comments
 (0)