Skip to content

Commit 984b907

Browse files
committed
---
yaml --- r: 143302 b: refs/heads/try2 c: 0522955 h: refs/heads/master v: v3
1 parent 4763351 commit 984b907

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1608
-562
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: c32b26be1000673e06ef2e5d114e39a28a5d6cd5
8+
refs/heads/try2: 0522955d10f76ac2ca3182de9ff5b774982243cb
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ mod m1 {
14941494
This example shows how one can use `allow` and `warn` to toggle
14951495
a particular check on and off.
14961496

1497-
~~~
1497+
~~~{.xfail-test}
14981498
#[warn(missing_doc)]
14991499
mod m2{
15001500
#[allow(missing_doc)]

branches/try2/doc/tutorial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ let mut x = 5;
11541154
let y = &x; // x is now frozen, it cannot be modified
11551155
}
11561156
// x is now unfrozen again
1157+
# x = 3;
11571158
~~~~
11581159
11591160
Mutable managed boxes handle freezing dynamically when any of their contents

branches/try2/src/etc/extract-tests.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,10 @@
5959
block = "fn main() {\n" + block + "\n}\n"
6060
if not re.search(r"\bextern mod extra\b", block):
6161
block = "extern mod extra;\n" + block
62-
block = """#[ forbid(ctypes) ];
63-
#[ forbid(path_statement) ];
64-
#[ forbid(type_limits) ];
65-
#[ forbid(unrecognized_lint) ];
66-
#[ forbid(unused_imports) ];
67-
#[ forbid(while_true) ];
68-
69-
#[ warn(non_camel_case_types) ];\n
62+
block = """#[ deny(warnings) ];
63+
#[ allow(unused_variable) ];\n
64+
#[ allow(dead_assignment) ];\n
65+
#[ allow(unused_mut) ];\n
7066
""" + block
7167
if xfail:
7268
block = "// xfail-test\n" + block

branches/try2/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, |x,y| conv(x,y));
189+
let regions = parse_region_substs(st);
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, conv: conv_did) -> ty::RegionSubsts {
205+
fn parse_region_substs(st: &mut PState) -> ty::RegionSubsts {
206206
match next(st) {
207207
'e' => ty::ErasedRegions,
208208
'n' => {

branches/try2/src/librustc/middle/lint.rs

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

830-
fn check_case(cx: &Context, ident: ast::ident, span: span) {
830+
fn check_case(cx: &Context, sort: &str, ident: ast::ident, span: span) {
831831
if !is_camel_case(cx.tcx, ident) {
832-
cx.span_lint(non_camel_case_types, span,
833-
"type, variant, or trait should have \
834-
a camel case identifier");
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)));
835836
}
836837
}
837838

838839
match it.node {
839-
ast::item_ty(*) | ast::item_struct(*) |
840+
ast::item_ty(*) | ast::item_struct(*) => {
841+
check_case(cx, "type", it.ident, it.span)
842+
}
840843
ast::item_trait(*) => {
841-
check_case(cx, it.ident, it.span)
844+
check_case(cx, "trait", it.ident, it.span)
842845
}
843846
ast::item_enum(ref enum_definition, _) => {
844-
check_case(cx, it.ident, it.span);
847+
check_case(cx, "type", it.ident, it.span);
845848
for enum_definition.variants.iter().advance |variant| {
846-
check_case(cx, variant.node.name, variant.span);
849+
check_case(cx, "variant", variant.node.name, variant.span);
847850
}
848851
}
849852
_ => ()

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
17911791
bcx = _match::store_arg(bcx, args[arg_n].pat, llarg);
17921792

17931793
if fcx.ccx.sess.opts.extra_debuginfo && fcx_has_nonzero_span(fcx) {
1794-
debuginfo::create_argument_metadata(bcx, &args[arg_n], args[arg_n].ty.span);
1794+
debuginfo::create_argument_metadata(bcx, &args[arg_n]);
17951795
}
17961796
}
17971797

0 commit comments

Comments
 (0)