summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-10-06rustdoc: Include lifetimes in re-exported boundsTom Jakubowski-0/+4
Fix #17818
2014-10-06rustdoc: Remove dummy UnknownBound variantTom Jakubowski-5/+3
2014-10-06rustdoc: Support unboxed fn sugar in boundsTom Jakubowski-6/+18
2014-10-06rustdoc: Correctly name lifetimes in boundsTom Jakubowski-10/+19
Fix #16518
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-8/+0
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-3/+3
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02rustdoc: remove handling of Gc.Eduard Burtescu-7/+0
2014-10-02syntax: ast: remove TyBox and UnBox.Eduard Burtescu-1/+0
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-3/+3
2014-09-30Fixes ICE when using reexported unit-like structsMichael Kainer-6/+2
Fixes that unit-like structs cannot be used if they are reexported and used in another crate. The compiler fails with an ICE, because unit-like structs are exported as DefFn and the expression `UnitStruct` is interpreted as function pointer instead of a call to the constructor. To resolve this ambiguity tuple-like struct constructors are now exported as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new flag `is_ctor` in DefFn to true. Relevant changes are in `rustc::metadata::{encoder, decoder}` and in `rustc::middle::ty`. Closes #12660 and #16973.
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-1/+23
Fix #16546
2014-09-23Deal with the fallout of string stabilizationAlex Crichton-2/+2
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-4/+4
2014-09-19Add enum variants to the type namespaceNick Cameron-19/+19
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-1/+61
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-17rustdoc: Correctly distinguish enums and typesP1start-2/+9
This is done by adding a new field to the `DefTy` variant of `middle::def::Def`, which also clarifies an error message in the process. Closes #16712.
2014-09-16Fallout from renamingAaron Turon-23/+23
2014-09-15Port coherence to use the new trait matching codeNiko Matsakis-1/+1
2014-09-14rustdoc: fix fallout from using ptr::P.Eduard Burtescu-15/+15
2014-09-08rustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.Eduard Burtescu-437/+407
2014-08-28auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichtonbors-10/+10
Per API meeting https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-13.md # Changes to `core::option` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. However, a few methods have been deprecated, either due to lack of use or redundancy: * `take_unwrap`, `get_ref` and `get_mut_ref` (redundant, and we prefer for this functionality to go through an explicit .unwrap) * `filtered` and `while` * `mutate` and `mutate_or_set` * `collect`: this functionality is being moved to a new `FromIterator` impl. # Changes to `core::result` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. * `collect`: this functionality is being moved to a new `FromIterator` impl. * `fold_` is deprecated due to lack of use * Several methods found in `core::option` are added here, including `iter`, `as_slice`, and variants. Due to deprecations, this is a: [breaking-change]
2014-08-28Fallout from stabilizing core::optionAaron Turon-10/+10
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-23/+22
2014-08-27auto merge of #16766 : kevinmehall/rust/issue-15976, r=alexcrichtonbors-8/+1
As of 8876ce44, `is_sugared_doc` is encoded in metadata, so there is no need to assume that all `doc` attributes came from sugared comments. Fixes #15976
2014-08-26rustdoc: Don't assume that a doc attribute was sugared: Fixes #15976Kevin Mehall-8/+1
As of 8876ce44, `is_sugared_doc` is encoded in metadata, so there is no need to assume that doc attributes came from sugared comments.
2014-08-26DST coercions and DST structsNick Cameron-2/+3
[breaking-change] 1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code. 2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible. 3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
2014-08-14librustc: Implement simple `where` clauses.Patrick Walton-12/+12
These `where` clauses are accepted everywhere generics are currently accepted and desugar during type collection to the type parameter bounds we have today. A new keyword, `where`, has been added. Therefore, this is a breaking change. Change uses of `where` to other identifiers. [breaking-change]
2014-08-14librustc: Stop assuming that implementations and traits only containPatrick Walton-43/+74
methods. This paves the way to associated items by introducing an extra level of abstraction ("impl-or-trait item") between traits/implementations and methods. This new abstraction is encoded in the metadata and used throughout the compiler where appropriate. There are no functional changes; this is purely a refactoring.
2014-08-08auto merge of #16285 : alexcrichton/rust/rename-share, r=huonwbors-3/+3
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-07Rename `Share` to `Sync`Alex Crichton-3/+3
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-07Temporary bootstrapping hack: introduce syntax for r egion bounds like `'b:'a`,Niko Matsakis-0/+6
meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
2014-08-06AST refactoring: merge PatWild and PatWildMulti into one variant with a flag.Felix S. Klock II-2/+2
2014-08-05Fixes missing overflow lint for i64 #14269Falco Hirschenberger-2/+0
The `type_overflow` lint, doesn't catch the overflow for `i64` because the overflow happens earlier in the parse phase when the `u64` as biggest possible int gets casted to `i64` , without checking the for overflows. We can't lint in the parse phase, so a refactoring of the `LitInt` type was necessary. The types `LitInt`, `LitUint` and `LitIntUnsuffixed` where merged to one type `LitInt` which stores it's value as `u64`. An additional parameter was added which indicate the signedness of the type and the sign of the value.
2014-07-28rustdoc: remove extraneous .move_iter().collect()sCorey Richardson-24/+24
The impl of Clean for Vec obsoleted these long, long ago.
2014-07-28rustdoc: show struct field docs when inlinedCorey Richardson-3/+13
Some minor changes to the compiler to expose this information. Very inconvenient since struct fields aren't an item. Adds (yet another) table to metadata. Closes #15739
2014-07-25rustdoc: Inline items from foreign modsAlex Crichton-16/+22
These were all just previously skipped. Closes #15648
2014-07-25rustdoc: Correctly handle local renamingsAlex Crichton-5/+16
Previously a `pub use` would not rename the destination in rustdoc, it would always use the destination ident instead of the renamed ident.
2014-07-25rustdoc: Fix links to Box/GcAlex Crichton-11/+45
These are lang items now, so the internal representations need to be re-translated back to the original structures manually. Closes #15185 Closes #15800
2014-07-25rustdoc: Fix inlining type parametersAlex Crichton-34/+12
I'm not entirely sure if the correct space can be inferred when cleaning Generics, so the impl has been switched to take the space explicitly. Closes #15099
2014-07-25rustdoc: Hide impls for #[doc(hidden)] traitsAlex Crichton-2/+27
Closes #14585
2014-07-24libsyntax: Remove `~self` and `mut ~self` from the language.Patrick Walton-1/+0
This eliminates the last vestige of the `~` syntax. Instead of `~self`, write `self: Box<TypeOfSelf>`; instead of `mut ~self`, write `mut self: Box<TypeOfSelf>`, replacing `TypeOfSelf` with the self-type parameter as specified in the implementation. Closes #13885. [breaking-change]
2014-07-20Implement new mod import sugarJakub Wieczorek-6/+12
Implements RFC #168.
2014-07-18librustc: Implement unboxed closures with mutable receiversPatrick Walton-0/+2
2014-07-16librustc: Allow the new UFCS explicit self in trait definitions, andPatrick Walton-1/+1
remove `~self` from the test suite.
2014-07-16librustc: Implement the fully-expanded, UFCS form of explicit self.Patrick Walton-19/+29
This makes two changes to region inference: (1) it allows region inference to relate early-bound regions; and (2) it allows regions to be related before variance runs. The former is needed because there is no relation between the two regions before region substitution happens, while the latter is needed because type collection has to run before variance. We assume that, before variance is inferred, that lifetimes are invariant. This is a conservative overapproximation. This relates to #13885. This does not remove `~self` from the language yet, however. [breaking-change]
2014-07-17deprecate Vec::getNick Cameron-1/+1
2014-07-15change to new trait style for method field refsJohn Clements-11/+12
Per @pnkfelix 's suggestion, using a trait to make these field accesses more readable (and vastly more similar to the original code. oops fix new ast_map fix
2014-07-13refactor Method definition to make space for macrosJohn Clements-10/+11
This change propagates to many locations, but because of the Macro Exterminator (or, more properly, the invariant that it protects), macro invocations can't occur downstream of expansion. This means that in librustc and librustdoc, extracting the desired field can simply assume that it can't be a macro invocation. Functions in ast_util abstract over this check.
2014-07-12auto merge of #15613 : cmr/rust/rustdoc-arg-patterns, r=alexcrichtonbors-3/+10