Niko Matsakis
a9f6babcda
convert privacy access levels into a query
2017-03-23 19:10:45 -04:00
Clar Charr
c09083c3d1
Fix for #39596 : sort Trait1 before Trait2.
2017-03-23 18:21:34 -04:00
Alex Crichton
e341d603fe
Remove internal liblog
...
This commit deletes the internal liblog in favor of the implementation that
lives on crates.io. Similarly it's also setting a convention for adding crates
to the compiler. The main restriction right now is that we want compiler
implementation details to be unreachable from normal Rust code (e.g. requires a
feature), and by default everything in the sysroot is reachable via `extern
crate`.
The proposal here is to require that crates pulled in have these lines in their
`src/lib.rs`:
#![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]
This'll mean that by default they're not using these attributes but when
compiled as part of the compiler they do a few things:
* Mark themselves as entirely unstable via the `staged_api` feature and the
`#![unstable]` attribute.
* Allow usage of other unstable crates via `feature(rustc_private)` which is
required if the crate relies on any other crates to compile (other than std).
2017-03-23 11:28:00 -07:00
Niko Matsakis
a3a5ff98eb
move export_map
into the tcx
2017-03-23 14:18:25 -04:00
Niko Matsakis
a29ae3052a
convert inherent-impl-related things to on-demand queries
...
There are now 3 queries:
- inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with
all its inherent impls. This internally uses `crate_inherent_impls`,
doing some hacks to keep the current deps (which, btw, are not clearly
correct).
- crate_inherent_impls(crate): gathers up a map from types
to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating
errors.
- crate_inherent_impls_overlap_check(crate): performs overlap checks
between the inherent impls for a given type, generating errors.
2017-03-23 13:27:28 -04:00
Corey Farwell
b2d62e8737
Rollup merge of #40725 - Cldfire:master, r=estebank
...
Remove duplicated styling in main.css
If nothing else, it saves a bit of data.
2017-03-22 19:30:34 -04:00
Cldfire
e2b5a8cf57
Remove duplicate style classes
2017-03-21 23:40:41 -04:00
Guillaume Gomez
f53172287a
Add whitespace around "=" in assoc items
2017-03-21 16:22:15 -04:00
Corey Farwell
d49f86901c
Rollup merge of #40587 - GuillaumeGomez:rustdoc-const-display, r=frewsxcv
...
Fix invalid debug display for associated consts
Fixes #40568 .
r? @rust-lang/docs
cc @SergioBenitez
2017-03-19 20:51:13 -04:00
Corey Farwell
a04c7de2cf
Rollup merge of #40564 - GuillaumeGomez:rustdoc-const, r=frewsxcv
...
Fix const not displayed in rustdoc
Fixes #40331 .
r? @rust-lang/docs
2017-03-19 10:18:15 -04:00
bors
9c15de4fd5
Auto merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrc
...
`TokenStream`-based attributes, paths in attribute and derive macro invocations
This PR
- refactors `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.
- supports macro invocation paths for attribute procedural macros.
- e.g. `#[::foo::attr_macro] struct S;`, `#[cfg_attr(all(), foo::attr_macro)] struct S;`
- supports macro invocation paths for derive procedural macros.
- e.g. `#[derive(foo::Bar, super::Baz)] struct S;`
- supports arbitrary tokens as arguments to attribute procedural macros.
- e.g. `#[foo::attr_macro arbitrary + tokens] struct S;`
- supports using arbitrary tokens in "inert attributes" with derive procedural macros.
- e.g. `#[derive(Foo)] struct S(#[inert arbitrary + tokens] i32);`
where `#[proc_macro_derive(Foo, attributes(inert))]`
r? @nrc
2017-03-19 10:56:08 +00:00
Corey Farwell
3ebce67ca3
Rollup merge of #40497 - wesleywiser:fix_sidebar, r=GuillaumeGomez
...
Fix sidebar not extending to the bottom of the page
Fixes #40459
2017-03-17 08:48:59 -04:00
Corey Farwell
dee6989b43
Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnik
...
Update usages of 'OSX' (and other old names) to 'macOS'.
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
2017-03-17 08:48:52 -04:00
Guillaume Gomez
5364acb418
Fix invalid debug display for associated consts
2017-03-17 00:27:36 +01:00
Guillaume Gomez
9b892745ad
Fix const not displayed in rustdoc
2017-03-16 02:15:10 +01:00
Jeffrey Seyfried
68c1cc68b4
Refactor Attribute
to use Path
and TokenStream
instead of MetaItem
.
2017-03-14 04:03:43 +00:00
Wesley Wiser
8b9b3b6d8b
Fix sidebar not extending to the bottom of the page
...
Fixes #40459
2017-03-13 20:36:41 -04:00
bors
a5483a7f36
Auto merge of #40451 - ollie27:rustdoc_impls_js_escape, r=GuillaumeGomez
...
rustdoc: Fix string escaping in implementors js files
The generated HTML can contain quotes so we need to make sure they are
escaped before inserting into the js files.
2017-03-13 12:44:22 +00:00
Corey Farwell
97a1b6a055
Update usages of 'OSX' (and other old names) to 'macOS'.
...
As of last year with version 'Sierra', the Mac operating system is now
called 'macOS'.
2017-03-12 14:59:04 -04:00
Oliver Middleton
19e0505dc7
rustdoc: Fix string escaping in implementors js files
...
The generates HTML can contain quotes so we need to make sure they are
escaped before inserting into the js files.
2017-03-12 05:12:27 +00:00
bors
744e69663e
Auto merge of #40446 - arielb1:rollup, r=alexcrichton
...
Rollup of 12 pull requests
- Successful merges: #40146 , #40299 , #40315 , #40319 , #40344 , #40345 , #40372 , #40373 , #40400 , #40404 , #40419 , #40431
- Failed merges:
2017-03-12 02:50:17 +00:00
bors
1b19284ad9
Auto merge of #40220 - jseyfried:ast_macro_def, r=nrc
...
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info
This PR
- adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items,
- [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today),
- removes `ast::MacroDef`, and
- no longer uses `Mark` and `Invocation` to identify and characterize macro definitions.
- We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter.
r? @nrc
2017-03-11 22:48:14 +00:00
Ariel Ben-Yehuda
7b0caa58d9
Rollup merge of #40419 - GuillaumeGomez:fix-const-rendering, r=frewsxcv
...
Fix associated consts display
Fixes #40370 .
r? @frewsxcv
2017-03-11 21:57:49 +02:00
Jeffrey Seyfried
8c98996934
Avoid using Mark
and Invocation
for macro defs.
2017-03-10 08:08:32 -08:00
Jeffrey Seyfried
212b6c2550
Refactor out ast::ItemKind::MacroDef
.
2017-03-10 08:08:32 -08:00
Guillaume Gomez
ea3c82cd96
Fix associated consts display
2017-03-10 16:21:07 +01:00
Guillaume Gomez
4078b25589
Clean up rustdoc css
2017-03-09 19:04:13 +01:00
Ariel Ben-Yehuda
d4eb25cf0e
Rollup merge of #40293 - malbarbo:rustdoctest, r=alexcrichton
...
Remove extra space in test description (of a mod test)
2017-03-08 20:54:00 +02:00
Wesley Wiser
2bb2a2975f
Improve the style of the sidebar in rustdoc output
...
Makes the sidebar a light grey and highlights the currently viewed item
in the sidebar more prominently.
All visual design credit goes to @johnwhelchel (#37856 )
2017-03-06 18:23:55 -05:00
Marco A L Barbosa
2e5b380180
Remove extra space in test description (of a mod test)
2017-03-06 10:05:31 -03:00
Vadim Petrochenkov
f2187093f8
Add/remove rerun-if-changed
when necessary
2017-03-04 21:38:26 +03:00
Jeffrey Seyfried
f6eaaf350e
Integrate TokenStream
.
2017-03-03 02:15:37 +00:00
Corey Farwell
fda3f98746
Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcv
...
Improve associated constant rendering in rustdoc
Before:
<img width="1440" alt="screen shot 2017-02-19 at 00 30 51" src="https://cloud.githubusercontent.com/assets/3050060/23097697/caeed80e-f63a-11e6-98c2-5d27e4efd76d.png ">
After:
<img width="1440" alt="screen shot 2017-02-19 at 00 30 39" src="https://cloud.githubusercontent.com/assets/3050060/23097698/cfb4874e-f63a-11e6-80cf-ffbf5c5c6162.png ">
cc @SergioBenitez
r? @rust-lang/docs
2017-02-28 22:55:28 -05:00
Jeffrey Seyfried
0cc7053efa
Remove Token::MatchNt
.
2017-02-28 22:15:09 +00:00
Jeffrey Seyfried
d8b34e9a74
Add syntax::ext::tt::quoted::{TokenTree, ..}
and remove tokenstream::TokenTree::Sequence
.
2017-02-28 22:14:29 +00:00
Corey Farwell
15cd43b4aa
Rollup merge of #40057 - GuillaumeGomez:html-issue, r=frewsxcv
...
Fix nightly-only experimental API display
Before:
<img width="1440" alt="screen shot 2017-02-23 at 12 53 09" src="https://cloud.githubusercontent.com/assets/3050060/23258119/0c9cf6f2-f9c7-11e6-9989-15b4346dade0.png ">
After:
<img width="1440" alt="screen shot 2017-02-23 at 12 51 40" src="https://cloud.githubusercontent.com/assets/3050060/23258076/e6881118-f9c6-11e6-826c-442a73502b59.png ">
r? @frewsxcv
2017-02-28 08:33:05 -05:00
Guillaume Gomez
d06f72d062
Apply the same transformation to every types
2017-02-28 00:27:19 +01:00
Guillaume Gomez
5ac7a035af
Put the const type and value into <code>
2017-02-26 18:55:07 +01:00
Guillaume Gomez
081336e8eb
Improve associated constant rendering in rustdoc
2017-02-26 15:50:53 +01:00
Guillaume Gomez
8c8eda8ecd
Fix nightly-only experimental API display
2017-02-25 17:48:09 +01:00
Eduard-Mihai Burtescu
c832e6f327
rustc_typeck: rework coherence to be almost completely on-demand.
2017-02-25 18:35:26 +02:00
Eduard-Mihai Burtescu
91374f8fe4
rustc: combine BareFnTy and ClosureTy into FnSig.
2017-02-25 17:47:15 +02:00
Eduard Burtescu
4649f7387e
rustc_typeck: lift CrateCtxt to TyCtxt.
2017-02-25 17:07:59 +02:00
Eduard Burtescu
b5c4244c6c
rustc: introduce a query system for type information in ty::maps.
2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
cc8a3a93b7
rustc: consolidate dep-tracked hashmaps in tcx.maps.
2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
e8d01ea4c7
rustc: store type parameter defaults outside of ty::Generics.
2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
a6a5c32e0e
Rollup merge of #39953 - keeperofdakeys:macro-error, r=jseyfried
...
Provide suggestions for unknown macros imported with `use`
cc https://github.com/rust-lang/rust/issues/30197
r? @jseyfried
2017-02-25 14:13:23 +02:00
Josh Driver
4ecdc68153
Move MacroKind into Def::Macro
2017-02-23 20:12:33 +10:30
Guillaume Gomez
047a215b4d
Set rustdoc --test files' path relative to the current directory
2017-02-16 22:35:29 +01:00
Guillaume Gomez
cc8d455895
Add filename when running rustdoc --test on a markdown file
2017-02-13 18:11:20 +01:00