Skip to content

Register new snapshot, use slicing syntax everywhere#20721

Merged
bors merged 5 commits into
rust-lang:masterfrom
japaric:snap
Jan 8, 2015
Merged

Register new snapshot, use slicing syntax everywhere#20721
bors merged 5 commits into
rust-lang:masterfrom
japaric:snap

Conversation

@japaric

@japaric japaric commented Jan 7, 2015

Copy link
Copy Markdown
Contributor

This PR removes the Index[Mut] traits from the prelude (which were temporarily added to help landing a PR). Note that you don't need to have those traits in scope to use the indexing sugar.

[breaking-change]


(I didn't address the NOTE(stage0) comments that didn't involve a #[cfg(stage0)] attribute in this PR (all of them are related to String/Show). However, I did try the changes specified in those comments in a local build but that ended breaking compiletest which resulted in ~1500 failed cfail tests, and I didn't investigate further. @seanmonstar you may want to look into it.)

r? @nick29581 / @alexcrichton

@aturon

aturon commented Jan 7, 2015

Copy link
Copy Markdown
Contributor

@japaric Amazing!

I think we should consider removing the slicing_syntax gate (which is already a bit of a misnomer, since it's applied even for examples like for x in 0..1000 { ... }).

@japaric

japaric commented Jan 7, 2015

Copy link
Copy Markdown
Contributor Author

Just noticed that I need to update a lot of &mut _ patterns too! This going to take a while...

@aturon

aturon commented Jan 8, 2015

Copy link
Copy Markdown
Contributor

LGTM

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustc/lint/builtin.rs
	src/librustc/session/config.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/context.rs
	src/librustc_trans/trans/type_.rs
	src/librustc_typeck/check/_match.rs
	src/librustdoc/html/format.rs
	src/libsyntax/std_inject.rs
	src/libsyntax/util/interner.rs
	src/test/compile-fail/mut-pattern-mismatched.rs
@nrc

nrc commented Jan 8, 2015

Copy link
Copy Markdown
Member

btw, #20720 fixes the precedence issue with ranges, so where we currently have to use parens, you won't need to. E.g, &foo[a+1..]. It will need another snapshot though.

@bors bors merged commit 7d72719 into rust-lang:master Jan 8, 2015
@japaric japaric deleted the snap branch January 22, 2015 16:11
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants