Skip to content

Commit ed4b261

Browse files
committed
---
yaml --- r: 169717 b: refs/heads/master c: f4a2672 h: refs/heads/master i: 169715: 962e963 v: v3
1 parent 0cbc018 commit ed4b261

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
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: 0bd022c893b00e0bb76d84bbbf8ccf7f685aad9c
2+
refs/heads/master: f4a26726000d2b2144b2f929ad0555868d85f32f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb

trunk/src/librustc/metadata/creader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ impl<'a> CrateReader<'a> {
497497
let register = should_link && self.existing_match(info.name.as_slice(), None).is_none();
498498
let metadata = if register {
499499
// Register crate now to avoid double-reading metadata
500-
let (_, cmd, _) = self.register_crate(&None, info.ident[],
501-
info.name[], span, library);
500+
let (_, cmd, _) = self.register_crate(&None, &info.ident[],
501+
&info.name[], span, library);
502502
PMDSource::Registered(cmd)
503503
} else {
504504
// Not registering the crate; just hold on to the metadata

trunk/src/librustc/session/config.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,20 @@ macro_rules! options {
311311
if !setter(&mut op, value) {
312312
match (value, opt_type_desc) {
313313
(Some(..), None) => {
314-
early_error(format!("{} option `{}` takes no \
314+
early_error(&format!("{} option `{}` takes no \
315315
value", $outputname, key)[])
316316
}
317317
(None, Some(type_desc)) => {
318-
early_error(format!("{0} option `{1}` requires \
318+
early_error(&format!("{0} option `{1}` requires \
319319
{2} ({3} {1}=<value>)",
320-
$outputname, key, type_desc, $prefix)[])
320+
$outputname, key,
321+
type_desc, $prefix)[])
321322
}
322323
(Some(value), Some(type_desc)) => {
323-
early_error(format!("incorrect value `{}` for {} \
324+
early_error(&format!("incorrect value `{}` for {} \
324325
option `{}` - {} was expected",
325-
value, $outputname, key, type_desc)[])
326+
value, $outputname,
327+
key, type_desc)[])
326328
}
327329
(None, None) => unreachable!()
328330
}
@@ -331,7 +333,7 @@ macro_rules! options {
331333
break;
332334
}
333335
if !found {
334-
early_error(format!("unknown codegen option: `{}`",
336+
early_error(&format!("unknown codegen option: `{}`",
335337
key)[]);
336338
}
337339
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2014 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+
// aux-build:lint_plugin_test.rs
12+
// ignore-stage1
13+
// ignore-pretty: Random space appears with the pretty test
14+
// compile-flags: -Z extra-plugins=lint_plugin_test
15+
16+
fn lintme() { } //~ WARNING item is named 'lintme'
17+
18+
#[allow(test_lint)]
19+
pub fn main() {
20+
fn lintme() { }
21+
}

0 commit comments

Comments
 (0)