Skip to content

trpl: Additions & fixes for syntax index. #29391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2015

Conversation

DanielKeep
Copy link
Contributor

  • const: Add reference to raw pointers
  • Change expr!(...) etc. examples to use ident instead.
    Technically, it should be pat, but that's not how it works in
    practice.
  • |: add reference to closure syntax.
  • Closure syntax entry.
  • Indexing and slicing entries.
  • Add history of obsolete and deprecated syntax.

r? @steveklabnik

* `extern crate bar = foo` (removed 0.12): syntax for `extern crate foo as bar`.
* `use bar = foo` (removed 0.12): syntax for `use foo as bar`.
* `<Sized? ident>` (removed 0.12): syntax for `<ident: ?Sized>`.
* `Gc<type>` (removed 0.12): smart-pointer type; replaced by `Rc<type>` and `Arc<type>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is wise to include this as "deprecated". The syntax can still work when Gc is defined in an external crate like https://github.com/Manishearth/rust-gc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence about Gc; the intent is for people looking at old code to figure out what it means. Since Gc was completely removed, they can't rely on deprecation warnings or the like. But, as you say, it's possible that it might be reintroduced somehow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax was @T, OTOH Gc<T> is not special syntax, "just" a library type.

@steveklabnik
Copy link
Member

I am not sure that I like the idea of including deprecated/removed syntax here.

@tshepang
Copy link
Member

I agree with @steveklabnik

@steveklabnik
Copy link
Member

After two weeks of thought, yes, please remove the stuff that's deprecated / removed. After that, let's get this merged!

@DanielKeep
Copy link
Contributor Author

@steveklabnik Will do. I went to do this earlier, but rustc won't build on my machine any more, so I can't build the docs, and I have an aversion to untested changes. I'll sort something out.

@bors
Copy link
Collaborator

bors commented Nov 19, 2015

☔ The latest upstream changes (presumably #29932) made this pull request unmergeable. Please resolve the merge conflicts.

@steveklabnik
Copy link
Member

@ping! @DanielKeep I'm willing to test the changes before merging if you want to keep this PR alive.

* `const`: Add reference to raw pointers
* Change `expr!(...)` etc. examples to use `ident` instead.
  *Technically*, it should be `pat`, but that's not how it works in
  practice.
* `|`: add reference to closure syntax.
* Closure syntax entry.
* Indexing and slicing entries.
@DanielKeep
Copy link
Contributor Author

I've removed the obsolete section and rebased to latest master.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 1, 2015

📌 Commit a34274c has been approved by steveklabnik

bors added a commit that referenced this pull request Dec 1, 2015
* `const`: Add reference to raw pointers
* Change `expr!(...)` etc. examples to use `ident` instead.
  *Technically*, it should be `pat`, but that's not how it works in
  practice.
* `|`: add reference to closure syntax.
* Closure syntax entry.
* Indexing and slicing entries.
* Add history of obsolete and deprecated syntax.

r? @steveklabnik
@bors
Copy link
Collaborator

bors commented Dec 1, 2015

⌛ Testing commit a34274c with merge dfe88bf...

@bors bors merged commit a34274c into rust-lang:master Dec 1, 2015
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.

7 participants