Skip to content

Commit c38456a

Browse files
committed
librustdoc: De-@mut librustdoc
1 parent af0439b commit c38456a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/librustdoc/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn run_core (libs: HashSet<Path>, cfgs: ~[~str], path: &Path) -> (clean::Cra
8888
let ctxt = @ctxt;
8989
local_data::set(super::ctxtkey, ctxt);
9090

91-
let v = @mut RustdocVisitor::new();
91+
let mut v = RustdocVisitor::new();
9292
v.visit(&ctxt.crate);
9393

9494
(v.clean(), analysis)

src/librustdoc/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
267267
/// This input format purely deserializes the json output file. No passes are
268268
/// run over the deserialized output.
269269
fn json_input(input: &str) -> Result<Output, ~str> {
270-
let input = match File::open(&Path::new(input)) {
270+
let mut input = match File::open(&Path::new(input)) {
271271
Some(f) => f,
272272
None => return Err(format!("couldn't open {} for reading", input)),
273273
};
274-
match json::from_reader(@mut input as @mut io::Reader) {
274+
match json::from_reader(&mut input) {
275275
Err(s) => Err(s.to_str()),
276276
Ok(json::Object(obj)) => {
277277
let mut obj = obj;
@@ -332,6 +332,6 @@ fn json_output(crate: clean::Crate, res: ~[plugins::PluginJson], dst: Path) {
332332
json.insert(~"crate", crate_json);
333333
json.insert(~"plugins", json::Object(plugins_json));
334334

335-
let file = @mut File::create(&dst).unwrap();
336-
json::Object(json).to_writer(file as @mut io::Writer);
335+
let mut file = File::create(&dst).unwrap();
336+
json::Object(json).to_writer(&mut file);
337337
}

src/librustdoc/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn run(input: &str, matches: &getopts::Matches) -> int {
6767
};
6868
local_data::set(super::ctxtkey, ctx);
6969

70-
let v = @mut RustdocVisitor::new();
70+
let mut v = RustdocVisitor::new();
7171
v.visit(&ctx.crate);
7272
let crate = v.clean();
7373
let (crate, _) = passes::unindent_comments(crate);

src/librustdoc/visit_ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl RustdocVisitor {
3232
}
3333

3434
impl RustdocVisitor {
35-
pub fn visit(@mut self, crate: &ast::Crate) {
35+
pub fn visit(&mut self, crate: &ast::Crate) {
3636
self.attrs = crate.attrs.clone();
3737
fn visit_struct_def(item: &ast::item, sd: @ast::struct_def, generics:
3838
&ast::Generics) -> Struct {

0 commit comments

Comments
 (0)