librustc: Remove `~"string"` and `&"string"` from the language #13877

Merged
merged 3 commits into from May 2, 2014

Projects

None yet

4 participants

@thestinger

No description provided.

@pcwalton pcwalton librustc: Remove `~"string"` and `&"string"` from the language
4baff4e
@bors
Collaborator
bors commented on 4baff4e May 1, 2014

saw approval from alexcrichton
at pcwalton@4baff4e

Collaborator
bors replied May 1, 2014

merging pcwalton/rust/de-tilde-str-vec = 4baff4e into auto

Collaborator
bors replied May 1, 2014

pcwalton/rust/de-tilde-str-vec = 4baff4e merged ok, testing candidate = 6e396b0

thestinger added some commits May 1, 2014
@thestinger thestinger remove leftover obsolete string literals 7852625
@thestinger thestinger fix error message for obsolete &"foo" literal
e93cb04
@bors
Collaborator
bors commented on e93cb04 May 1, 2014

saw approval from alexcrichton
at thestinger/rust@e93cb04

Collaborator
bors replied May 1, 2014

merging thestinger/rust/de-tilde-str-vec = e93cb04 into auto

Collaborator
bors replied May 1, 2014

thestinger/rust/de-tilde-str-vec = e93cb04 merged ok, testing candidate = e4b8400

Collaborator
bors replied May 1, 2014

saw approval from alexcrichton
at thestinger/rust@e93cb04

Collaborator
bors replied May 1, 2014

merging thestinger/rust/de-tilde-str-vec = e93cb04 into auto

Collaborator
bors replied May 1, 2014

thestinger/rust/de-tilde-str-vec = e93cb04 merged ok, testing candidate = 9f836d5

Collaborator
bors replied May 2, 2014

fast-forwarding master to auto = 9f836d5

@bors bors closed this May 2, 2014
@bors bors merged commit e93cb04 into rust-lang:master May 2, 2014

1 of 2 checks passed

Details continuous-integration/travis-ci The Travis CI build failed
default all tests passed
@thestinger thestinger deleted the unknown repository branch May 2, 2014
@huonw
Member
huonw commented May 2, 2014

These commits should've had a [breaking-change] annotation.

@pcwalton pcwalton referenced this pull request May 2, 2014
Closed

Remove ~str constructors #13543

@renato-zannon renato-zannon added a commit to renato-zannon/rust-bindgen that referenced this pull request May 2, 2014
@renato-zannon renato-zannon Fix build on 0.11pre: Change ~"foo" to "foo".to_owned()
[~"string" and &"string" literals are gone](rust-lang/rust#13877), and were
replaced by "string".to_owned() and just "string", respectively. This commit was made by a simple
`sed` to convert the existing instances of ~"string" on the codebase.

For reference, the command used was this:

    sed -e 's/~\("[^"]*"\)/\1.to_owned()/g' -i *.rs

That wouldn't work if for strings that contain the `\"` escape in them, but this codebase had none.

Similar work is likely to be necessary after [~T is substituted by
Box<T>](rust-lang/rust#13885).
6b4a11c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment