summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2016-08-16Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakisbors-15/+4
Implement the `!` type This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-15Auto merge of #35340 - michaelwoerister:incr-comp-cli-args, r=nikomatsakisbors-26/+23
Take commandline arguments into account for incr. comp. Implements the conservative strategy described in https://github.com/rust-lang/rust/issues/33727. From now one, every time a new commandline option is added, one has to specify if it influences the incremental compilation cache. I've tried to implement this as automatic as possible: One just has to added either the `[TRACKED]` or the `[UNTRACKED]` marker next to the field. The `Options`, `CodegenOptions`, and `DebuggingOptions` definitions in `session::config` show plenty of examples. The PR removes some cruft from `session::config::Options`, mostly unnecessary copies of flags also present in `DebuggingOptions` or `CodeGenOptions` in the same struct. One notable removal is the `cfg` field that contained the values passed via `--cfg` commandline arguments. I chose to remove it because (1) its content is only a subset of what later is stored in `hir::Crate::config` and it's pretty likely that reading the cfgs from `Options` would not be what you wanted, and (2) we could not incorporate it into the dep-tracking hash of the `Options` struct because of how the test framework works, leaving us with a piece of untracked but vital data. It is now recommended (just as before) to access the crate config via the `krate()` method in the HIR map. Because the `cfg` field is not present in the `Options` struct any more, some methods in the `CompilerCalls` trait now take the crate config as an explicit parameter -- which might constitute a breaking change for plugin authors.
2016-08-13Rename empty/bang to neverAndrew Cann-5/+4
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Remove obsolete divergence related stuffAndrew Cann-12/+0
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-13Fix rustdoc after rebaseAndrew Cann-0/+2
2016-08-12rustc: add TyAnon (impl Trait) to the typesystem.Eduard Burtescu-0/+12
2016-08-12syntax: add anonymized type syntax, i.e. impl TraitA+TraitB.Eduard Burtescu-0/+14
2016-08-11Remove the 'cfg' field from session::config::Options.Michael Woerister-6/+3
The 'cfg' in the Options struct is only the commandline-specified subset of the crate configuration and it's almost always wrong to read that instead of the CrateConfig in HIR crate node.
2016-08-11Add the notion of a dependency tracking status to commandline arguments.Michael Woerister-20/+20
Commandline arguments influence whether incremental compilation can use its compilation cache and thus their changes relative to previous compilation sessions need to be taking into account. This commit makes sure that one has to specify for every commandline argument whether it influences incremental compilation or not.
2016-08-11Substitute private type aliases in rustdocpetrochenkov-2/+79
2016-08-07Turn on new errors, json mode. Remove duplicate unicode testJonathan Turner-5/+1
2016-08-01Move caching of HIR-inlining into CStore in order to avoid duplicating ↵Michael Woerister-1/+6
inlined HIR.
2016-07-30Update gcc crate dependency to 0.3.27.Timon Van Overveldt-1/+1
This is to pull in changes to support ARM MUSL targets. This change also commits a couple of other cargo-generated changes to other dependencies in the various Cargo.toml files.
2016-07-29Auto merge of #34842 - cgswords:attr_enc, r=nrcbors-30/+31
Better attribute and metaitem encapsulation throughout the compiler This PR refactors most (hopefully all?) of the `MetaItem` interactions outside of `libsyntax` (and a few inside) to interact with MetaItems through the provided traits instead of directly creating / destruct / matching against them. This is a necessary first step to eventually converting `MetaItem`s to internally use `TokenStream` representations (which will make `MetaItem` interactions much nicer for macro writers once the new macro system is in place). r? @nrc
2016-07-25Adressed PR comments.cgswords-21/+1
2016-07-25General MetaItem encapsulation rewrites.cgswords-29/+50
2016-07-25rustdoc: Fix tuple struct where clause renderingOliver Middleton-2/+13
For tuple structs the where clause comes after the definition.
2016-07-22Auto merge of #34924 - cgswords:empty_delim, r=nrcbors-0/+1
Added empty CloseDelim to tokens for future use. Description says it all. I added a new DelimToken type, Empty, to indicate a Delimited tokenstream with no actual delimiters (which are variously useful for constructing macro output). r? @nrc
2016-07-19Introduced `NoDelim` and modified the compiler to support it.cgswords-0/+1
2016-07-19[CSS] Fix unwanted top margin for toggle wrapperggomez-1/+4
2016-07-14Remove BasicEmitterJonathan Turner-3/+3
2016-07-13Auto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichtonbors-2/+21
evaluate the array length of fixed size array types in rustdoc mitgates #34579 to fix it we'd need an expression simplifier. r? @steveklabnik cc @Osspial
2016-07-13Auto merge of #34772 - jseyfried:cleanup_interner, r=eddybbors-5/+3
Start cleaning up the string interner r? @eddyb
2016-07-13evaluate the array length of fixed size array types in rustdocOliver Schneider-2/+21
2016-07-12rustdoc: Fix methods in seach resultsOliver Middleton-46/+38
Currently methods from extern crates are sometimes added to the search index when they shouldn't be or added with the original path rather than the reexported path. This fixes that by making sure `cache().paths` only contains local paths like the description for it states. It also fixes a few minor issues with link rendering and redirect generation which would point to local crate docs even if the docs for that crate hadn't been generated. Also a bug with methods implemented on traits which caused wrong paths and so dead links in the search results has been fixed.
2016-07-11Avoid passing around the thread-local interner in `librustc_metadata`.Jeffrey Seyfried-5/+3
2016-07-11Auto merge of #34686 - alexcrichton:new-stage, r=luqmanabors-4/+2
rustc: Update stage0 to beta-2016-07-06 Hot off the presses, let's update our stage0 compiler!
2016-07-08Add tests + Fix rustdoc regression + Fix rebaseVadim Petrochenkov-1/+1
2016-07-08Merge PatKind::QPath into PatKind::Path in HIRVadim Petrochenkov-3/+3
2016-07-08Remove unnecessary accessor function VariantDefData::kindVadim Petrochenkov-1/+1
2016-07-06Rollup merge of #34685 - GuillaumeGomez:section_header, r=steveklabnikSteve Klabnik-8/+0
Remove invalid CSS rule for doc titles r? @steveklabnik Before: ![issue](https://cloud.githubusercontent.com/assets/3050060/16625595/a2f65914-43a5-11e6-9ff2-bcdf11b68cc3.png) After: ![fixed](https://cloud.githubusercontent.com/assets/3050060/16625602/a9b635ee-43a5-11e6-9f9d-853137eb4e6b.png)
2016-07-06Rollup merge of #34626 - sylvestre:master, r=ManishearthSteve Klabnik-2/+2
Fix typos
2016-07-06rustc: Update stage0 to beta-2016-07-06Alex Crichton-4/+2
Hot off the presses, let's update our stage0 compiler!
2016-07-06Remove invalid CSS rule for doc titlesggomez-8/+0
2016-07-05Auto merge of #34587 - ollie27:rustdoc_prim_titles, r=steveklabnikbors-7/+11
rustdoc: Remove paths from primitive page <title> tags Currently primitive pages have a title like "std::u8 - Rust" this changes it to "u8 - Rust" as "std::u8" is the name of a module not a primitive type.
2016-07-04Auto merge of #34638 - zackmdavis:if_let_over_none_empty_block_arm, r=jseyfriedbors-36/+25
prefer `if let` to match with `None => {}` arm in some places This is a spiritual succesor to #34268 / 8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block. ---- r? @jseyfried
2016-07-03Auto merge of #34480 - jseyfried:remove_entry_points, r=nrcbors-6/+6
Remove redundant `CompileController` entry points Remove the `after_expand` and `after_write_deps` `CompileController` entry points. The only things that separate these entry points from `after_hir_lowering` are dep-info generation and HIR map construction, neither of which is computationally intensive or has the potential to error. r? @nrc
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-36/+25
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-07-03Fix a few typos in the codeSylvestre Ledru-2/+2
2016-07-01Add the `after_expand` entry point between import resolution and the rest of ↵Jeffrey Seyfried-6/+6
name resolution
2016-06-30rustdoc: Remove paths from primitive page <title> tagsOliver Middleton-7/+11
Currently primitive pages have a title like "std::u8 - Rust" this changes it to "u8 - Rust" as "std::u8" is the name of a module not a primitive type.
2016-06-30Auto merge of #34541 - jseyfried:rollup, r=jseyfriedbors-23/+1
Rollup of 5 pull requests - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
2016-06-30Rollup merge of #34547 - sanxiyn:pretty-lifetime, r=pnkfelixJeffrey Seyfried-2/+2
Fix pretty-printing of lifetime bound Fix #34527.
2016-06-29Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichtonManish Goregaokar-0/+3
rustdoc: Fix empty Implementations section on some module pages These are caused by `DefaultImpl`s. For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
2016-06-29Rollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichtonManish Goregaokar-18/+40
rustdoc: Fix a few stripping issues We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set. For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).
2016-06-29Rollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichtonJeffrey Seyfried-23/+1
rustdoc: Remove Derived Implementations title As far as I know whether a trait was derived or not does not change the public API so there is no need to include this information in the docs. This title currently just adds an extra divide in the list of trait implementations which I don't think needs to be there.
2016-06-28rustdoc: Fix empty Implementations section on some module pagesOliver Middleton-0/+3
These are caused by `DefaultImpl`s.
2016-06-28Rollup merge of #34479 - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomezGuillaume Gomez-2/+2
rustdoc: Fix inlined renamed reexports in import lists Fixes #34473
2016-06-27Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearthbors-18/+24
Batch up libsyntax breaking changes Batch of the following syntax-[breaking-change] changes: - #34213: Add a variant `Macro` to `TraitItemKind` - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path` - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream` - #33943: - Remove the type parameter from `visit::Visitor` - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead. - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`. - Remove the field `ctxt` of `ast::Mac_` - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead. - #34316: - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`. - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`) - Rename `ast::ExprKind::Again` to `Continue`. - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>` - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>` - Use autoderef instead of `.as_attr_slice()` - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list. - #34403: Move errors into a separate crate (unlikely to cause breakage)
2016-06-27rustdoc: Fix a few stripping issuesOliver Middleton-18/+40
We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set.