Skip to content

Commit 3cae3da

Browse files
committed
---
yaml --- r: 64757 b: refs/heads/snap-stage3 c: 5c4cd30 h: refs/heads/master i: 64755: 32b00b9 v: v3
1 parent 9716a56 commit 3cae3da

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f5721c9334b2dca5375edd47428d0d317988fb9a
4+
refs/heads/snap-stage3: 5c4cd30f80273ba573df048b6295ea6e543df599
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ fn make_out_name(config: &config, testfile: &Path, extension: &str) -> Path {
681681
}
682682

683683
fn aux_output_dir_name(config: &config, testfile: &Path) -> Path {
684-
output_base_name(config, testfile).with_filetype("libaux")
684+
Path(output_base_name(config, testfile).to_str() + ".libaux")
685685
}
686686

687687
fn output_testname(testfile: &Path) -> Path {

branches/snap-stage3/src/librustc/metadata/tydecode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn parse_trait_store(st: &mut PState) -> ty::TraitStore {
186186
}
187187

188188
fn parse_substs(st: &mut PState, conv: conv_did) -> ty::substs {
189-
let regions = parse_region_substs(st);
189+
let regions = parse_region_substs(st, |x,y| conv(x,y));
190190

191191
let self_ty = parse_opt(st, |st| parse_ty(st, |x,y| conv(x,y)) );
192192

@@ -202,7 +202,7 @@ fn parse_substs(st: &mut PState, conv: conv_did) -> ty::substs {
202202
};
203203
}
204204

205-
fn parse_region_substs(st: &mut PState) -> ty::RegionSubsts {
205+
fn parse_region_substs(st: &mut PState, conv: conv_did) -> ty::RegionSubsts {
206206
match next(st) {
207207
'e' => ty::ErasedRegions,
208208
'n' => {

branches/snap-stage3/src/librustc/middle/lint.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -827,26 +827,23 @@ fn check_item_non_camel_case_types(cx: &Context, it: &ast::item) {
827827
!ident.contains_char('_')
828828
}
829829

830-
fn check_case(cx: &Context, sort: &str, ident: ast::ident, span: span) {
830+
fn check_case(cx: &Context, ident: ast::ident, span: span) {
831831
if !is_camel_case(cx.tcx, ident) {
832-
cx.span_lint(
833-
non_camel_case_types, span,
834-
fmt!("%s `%s` should have a camel case identifier",
835-
sort, cx.tcx.sess.str_of(ident)));
832+
cx.span_lint(non_camel_case_types, span,
833+
"type, variant, or trait should have \
834+
a camel case identifier");
836835
}
837836
}
838837

839838
match it.node {
840-
ast::item_ty(*) | ast::item_struct(*) => {
841-
check_case(cx, "type", it.ident, it.span)
842-
}
839+
ast::item_ty(*) | ast::item_struct(*) |
843840
ast::item_trait(*) => {
844-
check_case(cx, "trait", it.ident, it.span)
841+
check_case(cx, it.ident, it.span)
845842
}
846843
ast::item_enum(ref enum_definition, _) => {
847-
check_case(cx, "type", it.ident, it.span);
844+
check_case(cx, it.ident, it.span);
848845
for enum_definition.variants.iter().advance |variant| {
849-
check_case(cx, "variant", variant.node.name, variant.span);
846+
check_case(cx, variant.node.name, variant.span);
850847
}
851848
}
852849
_ => ()

branches/snap-stage3/src/librustc/middle/typeck/coherence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl CoherenceChecker {
439439
-> UniversalQuantificationResult {
440440
let regions = match polytype.generics.region_param {
441441
None => opt_vec::Empty,
442-
Some(_) => {
442+
Some(r) => {
443443
opt_vec::with(
444444
self.inference_context.next_region_var(
445445
infer::BoundRegionInCoherence))

branches/snap-stage3/src/test/compile-fail/lint-non-camel-case-types.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010

1111
#[forbid(non_camel_case_types)];
1212

13-
struct foo { //~ ERROR type `foo` should have a camel case identifier
13+
struct foo { //~ ERROR type, variant, or trait should have a camel case identifier
1414
bar: int,
1515
}
1616

17-
enum foo2 { //~ ERROR type `foo2` should have a camel case identifier
17+
enum foo2 { //~ ERROR type, variant, or trait should have a camel case identifier
1818
Bar
1919
}
2020

21-
struct foo3 { //~ ERROR type `foo3` should have a camel case identifier
21+
struct foo3 { //~ ERROR type, variant, or trait should have a camel case identifier
2222
bar: int
2323
}
2424

25-
type foo4 = int; //~ ERROR type `foo4` should have a camel case identifier
25+
type foo4 = int; //~ ERROR type, variant, or trait should have a camel case identifier
2626

2727
enum Foo5 {
28-
bar //~ ERROR variant `bar` should have a camel case identifier
28+
bar //~ ERROR type, variant, or trait should have a camel case identifier
2929
}
3030

31-
trait foo6 { //~ ERROR trait `foo6` should have a camel case identifier
31+
trait foo6 { //~ ERROR type, variant, or trait should have a camel case identifier
3232
}
3333

3434
fn main() { }

0 commit comments

Comments
 (0)