summary refs log tree commit diff
path: root/src/librustdoc/core.rs
AgeCommit message (Collapse)AuthorLines
2015-06-20Auto merge of #26417 - brson:feature-err, r=steveklabnikbors-2/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-18Make a better error message for using #[feature] on stable rustBrian Anderson-2/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-19rustc: enforce stack discipline on ty::ctxt.Eduard Burtescu-51/+52
2015-06-19rustc: remove ownership of tcx from trans' context.Eduard Burtescu-9/+9
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-1/+2
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-2/+2
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-2/+7
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-07rustdoc: Run external traits through filtersAlex Crichton-4/+0
This ensures that all external traits are run through the same filters that the rest of the AST goes through, stripping hidden function as necessary. Closes #13698
2015-02-28Separate most of rustc::lint::builtin into a separate crate.Huon Wilson-0/+2
This pulls out the implementations of most built-in lints into a separate crate, to reduce edit-compile-test iteration times with librustc_lint and increase parallelism. This should enable lints to be refactored, added and deleted much more easily as it slashes the edit-compile cycle to get a minimal working compiler to test with (`make rustc-stage1`) from librustc -> librustc_typeck -> ... -> librustc_driver -> libcore -> ... -> libstd to librustc_lint -> librustc_driver -> libcore -> ... libstd which is significantly faster, mainly due to avoiding the librustc build itself. The intention would be to move as much as possible of the infrastructure into the crate too, but the plumbing is deeply intertwined with librustc itself at the moment. Also, there are lints for which diagnostics are registered directly in the compiler code, not in their own crate traversal, and their definitions have to remain in librustc. This is a [breaking-change] for direct users of the compiler APIs: callers of `rustc::session::build_session` or `rustc::session::build_session_` need to manually call `rustc_lint::register_builtins` on their return value. This should make #22206 easier.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-2/+2
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-1/+1
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-27accommodate new scoping rules in rustc and rustdoc source.Felix S. Klock II-1/+1
2015-01-26Make '-A warnings' apply to all warnings, including feature gate warningsBrian Anderson-1/+1
2015-01-17rustdoc: Add some re-exportsTom Jakubowski-2/+4
2015-01-17rustdoc: Accept string source in core::run_coreTom Jakubowski-7/+9
This is wanted by external tooling that uses rustdoc. There are likely some bugs when actually generating HTML output (which may expect to be able to read the source) but all I need for now is the cleaned crate and analysis.
2015-01-12Make the compilation process more easily customisableNick Cameron-1/+6
2015-01-07Preliminary feature stagingBrian Anderson-1/+3
This partially implements the feature staging described in the [release channel RFC][rc]. It does not yet fully conform to the RFC as written, but does accomplish its goals sufficiently for the 1.0 alpha release. It has three primary user-visible effects: * On the nightly channel, use of unstable APIs generates a warning. * On the beta channel, use of unstable APIs generates a warning. * On the beta channel, use of feature gates generates a warning. Code that does not trigger these warnings is considered 'stable', modulo pre-1.0 bugs. Disabling the warnings for unstable APIs continues to be done in the existing (i.e. old) style, via `#[allow(...)]`, not that specified in the RFC. I deem this marginally acceptable since any code that must do this is not using the stable dialect of Rust. Use of feature gates is itself gated with the new 'unstable_features' lint, on nightly set to 'allow', and on beta 'warn'. The attribute scheme used here corresponds to an older version of the RFC, with the `#[staged_api]` crate attribute toggling the staging behavior of the stability attributes, but the user impact is only in-tree so I'm not concerned about having to make design changes later (and I may ultimately prefer the scheme here after all, with the `#[staged_api]` crate attribute). Since the Rust codebase itself makes use of unstable features the compiler and build system to a midly elaborate dance to allow it to bootstrap while disobeying these lints (which would otherwise be errors because Rust builds with `-D warnings`). This patch includes one significant hack that causes a regression. Because the `format_args!` macro emits calls to unstable APIs it would trigger the lint. I added a hack to the lint to make it not trigger, but this in turn causes arguments to `println!` not to be checked for feature gates. I don't presently understand macro expansion well enough to fix. This is bug #20661. Closes #16678 [rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-1/+1
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2014-12-30auto merge of #19941 : alexcrichton/rust/issue-19767, r=brsonbors-2/+3
This commit adds support for the compiler to distinguish between different forms of lookup paths in the compiler itself. Issue #19767 has some background on this topic, as well as some sample bugs which can occur if these lookup paths are not separated. This commits extends the existing command line flag `-L` with the same trailing syntax as the `-l` flag. Each argument to `-L` can now have a trailing `:all`, `:native`, `:crate`, or `:dependency`. This suffix indicates what form of lookup path the compiler should add the argument to. The `dependency` lookup path is used when looking up crate dependencies, the `crate` lookup path is used when looking for immediate dependencies (`extern crate` statements), and the `native` lookup path is used for probing for native libraries to insert into rlibs. Paths with `all` are used for all of these purposes (the default). The default compiler lookup path (the rustlib libdir) is by default added to all of these paths. Additionally, the `RUST_PATH` lookup path is added to all of these paths. Closes #19767
2014-12-29Fix rebase artifacts.Huon Wilson-1/+0
2014-12-29Collect tcx arenas into a single struct.Huon Wilson-7/+3
This allows expanding how many arenas exist without users having to care, since they are all created with CtxtArena::new().
2014-12-29Intern BareFnTys to make sty slightly smaller.Huon Wilson-1/+4
This cuts the ty_bare_fn variant to 48 bytes rather than 56. There doesn't seem to be a noticable memory usage decrease from this.
2014-12-29Store Substs in an arena in the tcx.Huon Wilson-1/+2
This current inflates memory use more than 3 times.
2014-12-23rustc: Add knowledge of separate lookup pathsAlex Crichton-2/+3
This commit adds support for the compiler to distinguish between different forms of lookup paths in the compiler itself. Issue #19767 has some background on this topic, as well as some sample bugs which can occur if these lookup paths are not separated. This commits extends the existing command line flag `-L` with the same trailing syntax as the `-l` flag. Each argument to `-L` can now have a trailing `:all`, `:native`, `:crate`, or `:dependency`. This suffix indicates what form of lookup path the compiler should add the argument to. The `dependency` lookup path is used when looking up crate dependencies, the `crate` lookup path is used when looking for immediate dependencies (`extern crate` statements), and the `native` lookup path is used for probing for native libraries to insert into rlibs. Paths with `all` are used for all of these purposes (the default). The default compiler lookup path (the rustlib libdir) is by default added to all of these paths. Additionally, the `RUST_PATH` lookup path is added to all of these paths. Closes #19767
2014-12-04Separate the driver into its own crate that uses trans, typeck.Niko Matsakis-1/+1
2014-12-04Remove dependencies on driver from trans et al. by moving variousNiko Matsakis-2/+2
structs out from driver and into other places.
2014-11-20rustdoc: avoid supplying a bad default sysroot so the librustc code can ↵Cody P Schafer-2/+1
calculate it properly
2014-11-18Move trans, back, driver, and back into a new crate, rustc_trans. Reduces ↵Niko Matsakis-3/+4
memory usage significantly and opens opportunities for more parallel compilation.
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-10-16librustdoc: Remove all uses of {:?}.Luqman Aden-1/+1
2014-10-06Properly handle cfgs in rustdocSteven Fackler-7/+2
Rustdoc would previously improperly handle key="value" style cfgs, which are notably used for Cargo features.
2014-09-16Fallout from renamingAaron Turon-1/+1
2014-09-14rustdoc: fix fallout from using ptr::P.Eduard Burtescu-53/+42
2014-09-08rustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.Eduard Burtescu-16/+18
2014-09-07Changed addl_lib_search_paths from HashSet to Vecinrustwetrust-3/+3
This makes the extra library paths given to the gcc linker come in the same order as the -L options on the rustc command line.
2014-07-25rustdoc: Add a --target flagAlex Crichton-3/+6
Closes #13893
2014-07-21rustdoc: Add an --extern flag analagous to rustc'sTom Jakubowski-3/+6
This adds an `--extern` flag to `rustdoc` much like the compiler's to specify the path where a given crate can be found.
2014-07-21rustc: Pass optional additional plugins to compile_inputBrian Anderson-1/+1
This provides a way for clients of the rustc library to add their own features to the pipeline.
2014-07-11Add scaffolding for assigning alpha-numeric codes to rustc diagnosticsJakub Wieczorek-1/+1
2014-07-05rustc: Default #[crate_name] on input, not outputAlex Crichton-5/+2
2014-07-05rustc: Remove CrateId and all related supportAlex Crichton-3/+11
This commit removes all support in the compiler for the #[crate_id] attribute and all of its derivative infrastructure. A list of the functionality removed is: * The #[crate_id] attribute no longer exists * There is no longer the concept of a version of a crate * Version numbers are no longer appended to symbol names * The --crate-id command line option has been removed To migrate forward, rename #[crate_id] to #[crate_name] and only the name of the crate itself should be mentioned. The version/path of the old crate id should be removed. For a transitionary state, the #[crate_id] attribute is still accepted if the #[crate_name] is not present, but it is warned about if it is the only identifier present. RFC: 0035-remove-crate-id [breaking-change]
2014-06-30rustdoc: incorporate stability index throughoutAaron Turon-1/+14
This commit hooks rustdoc into the stability index infrastructure in two ways: 1. It looks up stability levels via the index, rather than by manual attributes. 2. It adds stability level information throughout rustdoc output, rather than just at the top header. In particular, a stability color (with mouseover text) appears next to essentially every item that appears in rustdoc's HTML output. Along the way, the stability index code has been lightly refactored.
2014-06-24Convert builtin lints to uppercase names for style consistencyKeegan McAllister-1/+1
2014-06-24Store the registered lints in the SessionKeegan McAllister-2/+4
2014-06-24Replace enum LintId with an extensible alternativeKeegan McAllister-1/+3
2014-06-24Move lint.rs out of middleKeegan McAllister-1/+1
We're going to have more modules under lint, and the paths get unwieldy. We also plan to have lints run at multiple points in the compilation pipeline.
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-0/+1
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-3/+3
2014-06-09Implement #[plugin_registrar]Keegan McAllister-3/+2
See RFC 22. [breaking-change]