Mark Rousskov
b3a4f91b8d
Bump cfgs
2021-04-04 14:57:05 -04:00
Dylan DPC
7391124154
Rollup merge of #80720 - steffahn:prettify_prelude_imports, r=camelid,jyn514
...
Make documentation of which items the prelude exports more readable.
I recently figured out that rustdoc allows link inside of inline code blocks as long as they’re delimited with `<code> </code>` instead of `` ` ` ``. I think this applies nicely in the listing of prelude exports [in the docs](https://doc.rust-lang.org/std/prelude/index.html ). There, currently unformatted `::` and `{ , }` is used in order to mimick import syntax while attatching links to individual identifiers.
## Rendered Comparison
### Currently (light)

### After this PR (light)

### Currently (dark)

### After this PR (dark)

### Currently (ayu)

### After this PR (ayu)

_Edit:_ I just noticed, the “current” screenshots are from stable, so there are a few more differences in the pictures than the ones from just this PR.
2021-03-31 01:14:40 +02:00
Frank Steffahn
761296bcb3
Change back prelude headline
2021-03-29 15:14:14 +02:00
Mara Bos
924e522d16
Deprecate RustcEncodable and RustcDecodable.
2021-03-15 20:16:16 +01:00
Dylan DPC
759204ffc4
Rollup merge of #82217 - m-ou-se:edition-prelude, r=nikomatsakis
...
Edition-specific preludes
This changes `{std,core}::prelude` to export edition-specific preludes under `rust_2015`, `rust_2018` and `rust_2021`. (As suggested in https://github.com/rust-lang/rust/issues/51418#issuecomment-395630382 .) For now they all just re-export `v1::*`, but this allows us to add things to the 2021edition prelude soon.
This also changes the compiler to make the automatically injected prelude import dependent on the selected edition.
cc `@rust-lang/libs` `@djc`
2021-03-10 17:55:38 +01:00
Vadim Petrochenkov
5dad6c2575
Implement built-in attribute macro #[cfg_eval]
2021-03-06 23:03:19 +03:00
Mara
76fd8d7e74
Use intra-doc links.
...
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-02-25 13:45:57 +01:00
Mara Bos
1ab9fe5d44
Add {core,std}::prelude::{rust_2015,rust_2018,rust_2021}.
...
rust_2015 and rust_2018 are just re-exports of v1.
rust_2021 is a module that for now just re-exports everything from v1,
such that we can add more things later.
2021-02-25 12:46:46 +01:00
Vadim Petrochenkov
dbdbd30bf2
expand/resolve: Turn #[derive]
into a regular macro attribute
2021-02-07 20:08:45 +03:00
Frank Steffahn
fe0ab7f1b2
Make documentation of which items the prelude exports more readably.
2021-01-21 19:39:21 +01:00
Yuki Okushi
9abd746a32
Rollup merge of #80172 - camelid:prelude-docs-consistent-punct, r=steveklabnik
...
Use consistent punctuation for 'Prelude contents' docs
2021-01-21 20:04:39 +09:00
Daniel Henry-Mantilla
aa863caebe
Style nit: replace for_each
& return
with for
& continue
...
Co-Authored-By: Joshua Nelson <jyn514@gmail.com>
2021-01-06 15:13:38 +01:00
Camelid
25a4964191
Use heading for std::prelude
and not io::prelude
...
The heading style for `std::prelude` is to be consistent with the
headings for `std` and `core`: `# The Rust Standard Library` and
`# The Rust Core Library`, respectively.
2021-01-05 17:52:24 -08:00
Camelid
4274ba40bd
Use lowercase for prelude items
2021-01-05 17:51:27 -08:00
Camelid
c78bfbae28
Use consistent punctuation for 'Prelude contents' docs
2020-12-18 15:05:14 -08:00
pierwill
ea338f5443
Edit formatting in Rust Prelude docs
...
Use consistent punctuation and capitalization in the list
of things re-exported in the prelude.
Also adds a (possibly missing) word.
2020-12-17 21:22:58 -08:00
Joshua Nelson
bb103476a9
Fix incorrect link in prelude
2020-09-02 17:38:21 -04:00
Joshua Nelson
59a1a05bff
Convert many files to intra-doc links
...
- Use intra-doc links for `std::io` in `std::fs`
- Use intra-doc links for File::read in unix/ext/fs.rs
- Remove explicit intra-doc links for `true` in `net/addr.rs`
- Use intra-doc links in alloc/src/sync.rs
- Use intra-doc links in src/ascii.rs
- Switch to intra-doc links in alloc/rc.rs
- Use intra-doc links in core/pin.rs
- Use intra-doc links in std/prelude
- Use shorter links in `std/fs.rs`
`io` is already in scope.
2020-09-02 17:37:40 -04:00
Alexis Bourget
3ff06a9f2c
Move the std::vec link back to a path-based link to make it compile with --stage 0
2020-08-11 21:30:20 +02:00
Alexis Bourget
a6e492b5db
Move to doc links inside the prelude
2020-08-10 21:09:37 +02:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00