Skip to content

Commit 9cc364e

Browse files
committed
---
yaml --- r: 161693 b: refs/heads/master c: 38e008e h: refs/heads/master i: 161691: c9190ff v: v3
1 parent 186c25d commit 9cc364e

33 files changed

+100
-152
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 222a1eb7e80101de182142dc264cdcd81c894b2c
2+
refs/heads/master: 38e008eccdc85e6f34a7c165af62af76eddb93b5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cafe2966770ff377aad6dd9fd808e68055587c58
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6

trunk/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
598598
endif
599599

600600
ifeq ($(CFG_OSTYPE),apple-darwin)
601-
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
601+
CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root"
602602
endif
603603

604604
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that

trunk/src/librustc/middle/resolve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,7 @@ impl<'a> Resolver<'a> {
32393239
segment_name),
32403240
}
32413241
} else {
3242-
format!("Could not find `{}` in `{}`",
3242+
format!("Could not find `{}` in `{}`.",
32433243
segment_name,
32443244
module_name)
32453245
};
@@ -4744,7 +4744,7 @@ impl<'a> Resolver<'a> {
47444744
Some(&DefMod(_)) => {
47454745
self.resolve_error(path.span, "inherent implementations are not \
47464746
allowed for types not defined in \
4747-
the current module");
4747+
the current module.");
47484748
}
47494749
_ => {}
47504750
}
@@ -5843,12 +5843,12 @@ impl<'a> Resolver<'a> {
58435843
};
58445844

58455845
if msg.len() > 0 {
5846-
msg = format!(". Did you mean {}?", msg)
5846+
msg = format!(" Did you mean {}?", msg)
58475847
}
58485848

58495849
self.resolve_error(
58505850
expr.span,
5851-
format!("unresolved name `{}`{}",
5851+
format!("unresolved name `{}`.{}",
58525852
wrong_name,
58535853
msg).as_slice());
58545854
}

trunk/src/librustc/middle/typeck/collect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl<'a, 'tcx> AstConv<'tcx> for CrateCtxt<'a, 'tcx> {
184184

185185
fn ty_infer(&self, span: Span) -> Ty<'tcx> {
186186
span_err!(self.tcx.sess, span, E0121,
187-
"the type placeholder `_` is not allowed within types on item signatures");
187+
"the type placeholder `_` is not allowed within types on item signatures.");
188188
ty::mk_err()
189189
}
190190

@@ -1715,7 +1715,7 @@ fn add_unsized_bound<'tcx,AC>(this: &AC,
17151715
the given bound is not \
17161716
a default. \
17171717
Only `Sized?` is \
1718-
supported",
1718+
supported.",
17191719
desc).as_slice());
17201720
ty::try_add_builtin_trait(this.tcx(),
17211721
kind_id,

trunk/src/librustc/middle/typeck/infer/error_reporting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,15 +1648,15 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
16481648
self.tcx.sess.span_note(
16491649
span,
16501650
format!("...so that the type `{}` \
1651-
will meet the declared lifetime bounds",
1651+
will meet the declared lifetime bounds.",
16521652
self.ty_to_string(t)).as_slice());
16531653
}
16541654
infer::RelateDefaultParamBound(span, t) => {
16551655
self.tcx.sess.span_note(
16561656
span,
16571657
format!("...so that type parameter \
16581658
instantiated with `{}`, \
1659-
will meet its declared lifetime bounds",
1659+
will meet its declared lifetime bounds.",
16601660
self.ty_to_string(t)).as_slice());
16611661
}
16621662
infer::RelateRegionParamBound(span) => {

trunk/src/librustc_trans/trans/asm.rs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,19 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
7777
// no failure occurred preparing operands, no need to cleanup
7878
fcx.pop_custom_cleanup_scope(temp_scope);
7979

80-
let mut constraints = constraints.iter()
81-
.map(|s| s.get().to_string())
82-
.chain(ext_constraints.into_iter())
83-
.collect::<Vec<String>>()
84-
.connect(",");
85-
86-
let mut clobbers = ia.clobbers.iter()
87-
.map(|s| format!("~{{{}}}", s.get()))
88-
.collect::<Vec<String>>()
89-
.connect(",");
90-
let more_clobbers = get_clobbers();
91-
if !more_clobbers.is_empty() {
92-
if !clobbers.is_empty() {
93-
clobbers.push(',');
94-
}
95-
clobbers.push_str(more_clobbers.as_slice());
80+
let mut constraints =
81+
String::from_str(constraints.iter()
82+
.map(|s| s.get().to_string())
83+
.chain(ext_constraints.into_iter())
84+
.collect::<Vec<String>>()
85+
.connect(",")
86+
.as_slice());
87+
88+
let mut clobbers = get_clobbers();
89+
if !ia.clobbers.get().is_empty() && !clobbers.is_empty() {
90+
clobbers = format!("{},{}", ia.clobbers.get(), clobbers);
91+
} else {
92+
clobbers.push_str(ia.clobbers.get());
9693
}
9794

9895
// Add the clobbers to our constraints list

trunk/src/libsyntax/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ pub struct InlineAsm {
11771177
pub asm_str_style: StrStyle,
11781178
pub outputs: Vec<(InternedString, P<Expr>, bool)>,
11791179
pub inputs: Vec<(InternedString, P<Expr>)>,
1180-
pub clobbers: Vec<InternedString>,
1180+
pub clobbers: InternedString,
11811181
pub volatile: bool,
11821182
pub alignstack: bool,
11831183
pub dialect: AsmDialect,

trunk/src/libsyntax/ext/asm.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
5353
let mut asm_str_style = None;
5454
let mut outputs = Vec::new();
5555
let mut inputs = Vec::new();
56-
let mut clobs = Vec::new();
56+
let mut cons = "".to_string();
5757
let mut volatile = false;
5858
let mut alignstack = false;
5959
let mut dialect = ast::AsmAtt;
@@ -64,7 +64,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
6464
match state {
6565
Asm => {
6666
let (s, style) = match expr_to_string(cx, p.parse_expr(),
67-
"inline assembly must be a string literal") {
67+
"inline assembly must be a string literal.") {
6868
Some((s, st)) => (s, st),
6969
// let compilation continue
7070
None => return DummyResult::expr(sp),
@@ -138,6 +138,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
138138
}
139139
}
140140
Clobbers => {
141+
let mut clobs = Vec::new();
141142
while p.token != token::Eof &&
142143
p.token != token::Colon &&
143144
p.token != token::ModSep {
@@ -147,12 +148,15 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
147148
}
148149

149150
let (s, _str_style) = p.parse_str();
151+
let clob = format!("~{{{}}}", s);
152+
clobs.push(clob);
150153

151154
if OPTIONS.iter().any(|opt| s.equiv(opt)) {
152155
cx.span_warn(p.last_span, "expected a clobber, found an option");
153156
}
154-
clobs.push(s);
155157
}
158+
159+
cons = clobs.connect(",");
156160
}
157161
Options => {
158162
let (option, _str_style) = p.parse_str();
@@ -212,7 +216,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
212216
asm_str_style: asm_str_style.unwrap(),
213217
outputs: outputs,
214218
inputs: inputs,
215-
clobbers: clobs,
219+
clobbers: token::intern_and_get_ident(cons.as_slice()),
216220
volatile: volatile,
217221
alignstack: alignstack,
218222
dialect: dialect,

trunk/src/libsyntax/parse/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a> ParserAttr for Parser<'a> {
9999

100100
if permit_inner && self.eat(&token::Semi) {
101101
self.span_warn(span, "this inner attribute syntax is deprecated. \
102-
The new syntax is `#![foo]`, with a bang and no semicolon");
102+
The new syntax is `#![foo]`, with a bang and no semicolon.");
103103
style = ast::AttrInner;
104104
}
105105

trunk/src/libsyntax/parse/lexer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ impl<'a> StringReader<'a> {
809809
self.span_diagnostic.span_help(
810810
sp,
811811
"this is an isolated carriage return; consider checking \
812-
your editor and version control settings")
812+
your editor and version control settings.")
813813
}
814814
false
815815
}

trunk/src/libsyntax/parse/parser.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,14 +1296,13 @@ impl<'a> Parser<'a> {
12961296
let lo = p.span.lo;
12971297

12981298
let vis = p.parse_visibility();
1299-
let style = p.parse_fn_style();
13001299
let abi = if p.eat_keyword(keywords::Extern) {
13011300
p.parse_opt_abi().unwrap_or(abi::C)
13021301
} else {
13031302
abi::Rust
13041303
};
1305-
p.expect_keyword(keywords::Fn);
13061304

1305+
let style = p.parse_fn_style();
13071306
let ident = p.parse_ident();
13081307
let mut generics = p.parse_generics();
13091308

@@ -4459,13 +4458,12 @@ impl<'a> Parser<'a> {
44594458
self.span.hi) };
44604459
(ast::MethMac(m), self.span.hi, attrs)
44614460
} else {
4462-
let fn_style = self.parse_fn_style();
44634461
let abi = if self.eat_keyword(keywords::Extern) {
44644462
self.parse_opt_abi().unwrap_or(abi::C)
44654463
} else {
44664464
abi::Rust
44674465
};
4468-
self.expect_keyword(keywords::Fn);
4466+
let fn_style = self.parse_fn_style();
44694467
let ident = self.parse_ident();
44704468
let mut generics = self.parse_generics();
44714469
let (explicit_self, decl) = self.parse_fn_decl_with_self(|p| {
@@ -5011,13 +5009,14 @@ impl<'a> Parser<'a> {
50115009
})
50125010
}
50135011

5014-
/// Parse unsafe or not
5012+
/// Parse safe/unsafe and fn
50155013
fn parse_fn_style(&mut self) -> FnStyle {
5016-
if self.eat_keyword(keywords::Unsafe) {
5014+
if self.eat_keyword(keywords::Fn) { NormalFn }
5015+
else if self.eat_keyword(keywords::Unsafe) {
5016+
self.expect_keyword(keywords::Fn);
50175017
UnsafeFn
5018-
} else {
5019-
NormalFn
50205018
}
5019+
else { self.unexpected(); }
50215020
}
50225021

50235022

trunk/src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,11 +1839,7 @@ impl<'a> State<'a> {
18391839
try!(space(&mut self.s));
18401840
try!(self.word_space(":"));
18411841

1842-
try!(self.commasep(Inconsistent, a.clobbers.as_slice(),
1843-
|s, co| {
1844-
try!(s.print_string(co.get(), ast::CookedStr));
1845-
Ok(())
1846-
}));
1842+
try!(self.print_string(a.clobbers.get(), ast::CookedStr));
18471843
try!(self.pclose());
18481844
}
18491845
ast::ExprMac(ref m) => try!(self.print_mac(m)),

trunk/src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ extern crate macro_crate_test;
2020
fn main() {
2121
macro_crate_test::foo();
2222
//~^ ERROR failed to resolve. Use of undeclared module `macro_crate_test`
23-
//~^^ ERROR unresolved name `macro_crate_test::foo`
23+
//~^^ ERROR unresolved name `macro_crate_test::foo`.
2424
}

trunk/src/test/compile-fail/does-nothing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name `this_does_nothing_what_the`
11+
// error-pattern: unresolved name `this_does_nothing_what_the`.
1212
fn main() { println!("doing"); this_does_nothing_what_the; println!("boing"); }

trunk/src/test/compile-fail/import2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use baz::zed::bar;
12-
//~^ ERROR unresolved import `baz::zed::bar`. Could not find `zed` in `baz`
12+
//~^ ERROR unresolved import `baz::zed::bar`. Could not find `zed` in `baz`.
1313

1414

1515
mod baz {}

trunk/src/test/compile-fail/issue-1476.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
println!("{}", x); //~ ERROR unresolved name `x`
12+
println!("{}", x); //~ ERROR unresolved name `x`.
1313
}

trunk/src/test/compile-fail/issue-19398.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

trunk/src/test/compile-fail/issue-2281-part1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: unresolved name `foobar`
11+
// error-pattern: unresolved name `foobar`.
1212

1313
fn main() { println!("{}", foobar); }

trunk/src/test/compile-fail/issue-2356.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl MaybeDog {
2525
fn bark() {
2626
// If this provides a suggestion, it's a bug as MaybeDog doesn't impl Groom
2727
shave();
28-
//~^ ERROR: unresolved name `shave`
28+
//~^ ERROR: unresolved name `shave`.
2929
}
3030
}
3131

@@ -67,7 +67,7 @@ impl cat {
6767
grow_older();
6868
//~^ ERROR: unresolved name `grow_older`. Did you mean to call `cat::grow_older`
6969
shave();
70-
//~^ ERROR: unresolved name `shave`
70+
//~^ ERROR: unresolved name `shave`.
7171
}
7272

7373
fn burn_whiskers(&mut self) {
@@ -85,6 +85,6 @@ impl cat {
8585

8686
fn main() {
8787
self += 1;
88-
//~^ ERROR: unresolved name `self`
88+
//~^ ERROR: unresolved name `self`.
8989
// it's a bug if this suggests a missing `self` as we're not in a method
9090
}

trunk/src/test/compile-fail/issue-3021-b.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn siphash(k0 : u64) {
1717
impl siphash {
1818
pub fn reset(&mut self) {
1919
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
20-
//~^ ERROR unresolved name `k0`
20+
//~^ ERROR unresolved name `k0`.
2121
}
2222
}
2323
}

trunk/src/test/compile-fail/issue-3021-d.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ fn siphash(k0 : u64, k1 : u64) -> siphash {
2929
impl siphash for SipState {
3030
fn reset(&self) {
3131
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
32-
//~^ ERROR unresolved name `k0`
32+
//~^ ERROR unresolved name `k0`.
3333
self.v1 = k1 ^ 0x646f72616e646f6d; //~ ERROR can't capture dynamic environment
34-
//~^ ERROR unresolved name `k1`
34+
//~^ ERROR unresolved name `k1`.
3535
}
3636
fn result(&self) -> u64 { return mk_result(self); }
3737
}

trunk/src/test/compile-fail/issue-3021.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn siphash(k0 : u64) -> SipHash {
2020
impl SipHash for SipState {
2121
fn reset(&self) {
2222
self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment
23-
//~^ ERROR unresolved name `k0`
23+
//~^ ERROR unresolved name `k0`.
2424
}
2525
}
2626
panic!();

trunk/src/test/compile-fail/issue-7607-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct Foo {
1414
x: int
1515
}
1616

17-
impl Fo { //~ERROR inherent implementations are not allowed for types not defined in the current module
17+
impl Fo { //~ERROR inherent implementations are not allowed for types not defined in the current module.
1818
fn foo() {}
1919
}
2020

trunk/src/test/compile-fail/issue-8767.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-tidy-linelength
1212

13-
impl B { //~ERROR inherent implementations are not allowed for types not defined in the current module
13+
impl B { //~ERROR inherent implementations are not allowed for types not defined in the current module.
1414
}
1515

1616
fn main() {

trunk/src/test/compile-fail/match-join.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fn my_panic() -> ! { panic!(); }
1616
fn main() {
1717
match true { false => { my_panic(); } true => { } }
1818

19-
println!("{}", x); //~ ERROR unresolved name `x`
19+
println!("{}", x); //~ ERROR unresolved name `x`.
2020
let x: int;
2121
}

0 commit comments

Comments
 (0)