summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2016-05-14Remove ExplicitSelf from HIRVadim Petrochenkov-2/+1
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-28/+31
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-13/+13
2016-05-11rustc: Avoid free functions taking &TyCtxt and &InferCtxt.Eduard Burtescu-11/+10
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-2/+1
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-03rustdoc: fix inserting source code spans for constant valuesGeorg Brandl-5/+4
This will go wrong when the constants partially result from macro expansion. Instead, use the expressions and pretty-print them as Rust code. Fixes: #33302
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-2/+1
2016-04-24Remove, now unnecessary, workaroundmitaa-18/+2
This used to be done to avoid inlining impls referencing private items, but is now unnecessary since we actually check that impls do not reference non-doc-reachable items.
2016-04-24Inline impls on traits toomitaa-0/+1
2016-04-19Auto merge of #33002 - mitaa:rdoc-cross-impls, r=alexcrichtonbors-16/+22
rustdoc: refine cross-crate impl inlining This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation. fixes #14586 fixes #31948 .. and also applies the reachability checking to cross-crate links. fixes #28480 r? @alexcrichton
2016-04-18Reachability check cross-crate linksmitaa-12/+3
2016-04-18Perform doc-reachability check for inlined implsmitaa-12/+27
This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation.
2016-04-14Fix fallout in rustdocJeffrey Seyfried-3/+3
2016-04-13Retire rustdocs `ANALYSISKEY`mitaa-3/+3
The thread-local isn't needed and consists of mostly empty fields which were just used to move the data into `html::render::CACHE_KEY`.
2016-04-07Make `hir::Visibility` non-copyable and add `ty::Visibility`Jeffrey Seyfried-2/+2
2016-04-06rustc: retire hir::map's paths.Eduard Burtescu-2/+6
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-2/+2
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-2/+2
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-4/+4
2016-03-28Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichtonbors-5/+12
rustdoc: Correct anchor for links to associated trait items fixes #28478 r? @alexcrichton
2016-03-27Correct anchor for links to associated trait itemsmitaa-5/+12
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-2/+2
2016-03-27rustc: move middle::subst into middle::ty.Eduard Burtescu-1/+1
2016-03-22Consider `doc(no_inline)` in crate-local inliningmitaa-2/+2
2016-03-17const_eval: Take just one set of substitutions in lookup_const_by_id.Eduard Burtescu-2/+2
2016-03-14Auto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakisbors-3/+3
typestrong const integers ~~It would be great if someone could run crater on this PR, as this has a high danger of breaking valid code~~ Crater ran. Good to go. ---- So this PR does a few things: 1. ~~const eval array values when const evaluating an array expression~~ 2. ~~const eval repeat value when const evaluating a repeat expression~~ 3. ~~const eval all struct and tuple fields when evaluating a struct/tuple expression~~ 4. remove the `ConstVal::Int` and `ConstVal::Uint` variants and replace them with a single enum (`ConstInt`) which has variants for all integral types * `usize`/`isize` are also enums with variants for 32 and 64 bit. At creation and various usage steps there are assertions in place checking if the target bitwidth matches with the chosen enum variant 5. enum discriminants (`ty::Disr`) are now `ConstInt` 6. trans has its own `Disr` type now (newtype around `u64`) This obviously can't be done without breaking changes (the ones that are noticable in stable) We could probably write lints that find those situations and error on it for a cycle or two. But then again, those situations are rare and really bugs imo anyway: ```rust let v10 = 10 as i8; let v4 = 4 as isize; assert_eq!(v10 << v4 as usize, 160 as i8); ``` stops compiling because 160 is not a valid i8 ```rust struct S<T, S> { a: T, b: u8, c: S } let s = S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 }; ``` stops compiling because `0xaa_aa_aa_aa` is not a valid i32 ---- cc @eddyb @pnkfelix related: https://github.com/rust-lang/rfcs/issues/1071
2016-03-11Auto merge of #32133 - alexcrichton:linkchecker, r=brsonbors-2/+19
Add a link validator to rustbuild This commit was originally targeted at just adding a link checking script to the rustbuild system. This ended up snowballing a bit to extend rustbuild to be amenable to various tools we have as part of the build system in general. There's a new `src/tools` directory which has a number of scripts/programs that are purely intended to be used as part of the build system and CI of this repository. This is currently inhabited by rustbook, the error index generator, and a new linkchecker script added as part of this PR. I suspect that more tools like compiletest, tidy scripts, snapshot scripts, etc will migrate their way into this directory over time. The commit which adds the error index generator shows the steps necessary to add new tools to the build system, namely: 1. New steps are defined for building the tool and running the tool 2. The dependencies are configured 3. The steps are implemented In terms of the link checker, these commits do a few things: * A new `src/tools/linkchecker` script is added. This will read an entire documentation tree looking for broken relative links (HTTP links aren't followed yet). * A large number of broken links throughout the documentation were fixed. Many of these were just broken when viewed from core as opposed to std, but were easily fixed. * A few rustdoc bugs here and there were fixed
2016-03-10fix rustdocOliver Schneider-3/+3
2016-03-09Track fn type and lifetime parameters in TyFnDef.Eduard Burtescu-1/+1
2016-03-09Split TyBareFn into TyFnDef and TyFnPtr.Eli Friedman-1/+1
There's a lot of stuff wrong with the representation of these types: TyFnDef doesn't actually uniquely identify a function, TyFnPtr is used to represent method calls, TyFnDef in the sub-expression of a cast isn't correctly reified, and probably some other stuff I haven't discovered yet. Splitting them seems like the right first step, though.
2016-03-08rustdoc: Don't inline all impls all at onceAlex Crichton-2/+19
Right now whenever rustdoc inlines a struct or enum from another crate it ends up inlining *all* `impl` items found in the other crate at the same time. The rationale for this was to discover all trait impls which are otherwise not probed for. This unfortunately picks up a lot of impls of public traits for private types, causing lots of broken links. This commit instead hoards all of those inlined impls into a temporary storage location which is then selectively drawn from whenever we inline a new type. This should ensure that we still inline all relevant impls while avoiding all private ones.
2016-03-04Refactor rustdocs attribute handlingmitaa-17/+3
2016-03-04Simplify `if let`/`match` expressionsmitaa-16/+9
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-14/+14
2016-03-02Use numeric field `Name`s ("0", "1" etc) for positional fieldsVadim Petrochenkov-4/+2
2016-02-26Don't inline impls from `doc(hidden)` modulesmitaa-11/+16
2016-01-20Rename Def's variants and don't reexport themVadim Petrochenkov-13/+13
2016-01-20Refactor definitions of ADTs in rustc::middle::defVadim Petrochenkov-5/+6
2016-01-14Support generic associated constsMichael Wu-2/+2
2016-01-13Fix rustdoc reexports.Lee Jeffery-1/+1
2015-12-12Support `#[deprecated]` in rustdocVadim Petrochenkov-0/+5
2015-12-12Implement `#[deprecated]` attribute (RFC 1270)Vadim Petrochenkov-5/+5
2015-12-03Use the extern item-path for documentation linksmitaa-1/+1
The local item-path includes the local crates path to the extern crate declaration which breaks cross-crate rustdoc links if the extern crate is not linked into the crate root or renamed via `extern foo as bar`.
2015-11-26fix tidyAriel Ben-Yehuda-2/+2
2015-11-26fix tests & rustdocAriel Ben-Yehuda-9/+9
2015-11-26make check worksAriel Ben-Yehuda-31/+25
2015-11-19Show constness for functions of reexported docsmitaa-2/+15
2015-10-01kill the fake provided method stubsAriel Ben-Yehuda-7/+5
this simplifies the code while reducing the size of libcore.rlib by 3.3 MiB (~1M of which is bloat a separate patch of mine removes too), while reducing rustc memory usage on small crates by 18MiB. This also simplifies the code considerably.
2015-09-22Use Names in path fragments and MacroDefVadim Petrochenkov-1/+1
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-1/+1
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.