about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-03-08Link to actual CSPRNG in `hash::SipHasher` documentationDirk Gadsden-4/+4
2016-03-06Amend `hash::SipHasher` docs to more strongly discourage cryptographic usesDirk Gadsden-4/+3
2016-03-06Clarify documentation of `hash::SipHasher`Dirk Gadsden-6/+9
The docs were making assertions/recommendations they shouldn't have. This clarifies them and adds some helpful links. Fixes #32043.
2016-03-06Auto merge of #32056 - nikomatsakis:rustfmt-data-structures, r=alexcrichtonbors-370/+453
2016-03-06Auto merge of #32055 - mitaa:rdoc-strip-priv-imports, r=alexcrichtonbors-8/+51
fixes #27104 r? @alexcrichton
2016-03-06Auto merge of #32048 - bluss:overloaded-assign-op, r=eddybbors-6/+78
Do not trigger unused_assignments for overloaded AssignOps If `v` were a type with some kind of indirection, so that `v += 1` would have an effect even if `v` were not used anymore, the unused_assignments lint would mark a false positive. This exempts overloaded (non-primitive) assign ops from being treated as assignments (they are method calls). The previous compile-fail tests that ensure x += 1 can trigger for primitive types continue to pass. Added a representative test for the "view" indirection. Fixes #31895
2016-03-06Auto merge of #32041 - arielb1:multiply-inexhaustive, r=eddybbors-4/+21
the assert was invalidated by PR #31020 Fixes #31561 r? @eddyb
2016-03-06Auto merge of #32020 - alexcrichton:stabilize-into-ascii, r=brsonbors-8/+4
These were intended to land in stable 1.8 but were just waiting for the implementation PR, so now they're landing. Specifically this PR stabilizes: * `AsciiExt::into_ascii_uppercase` * `AsciiExt::into_ascii_lowercase` * `AsciiExt for Vec<u8>` * `AsciiExt for String`
2016-03-06Auto merge of #31967 - mitaa:rdoc-refactor, r=alexcrichtonbors-542/+356
This is mostly cleanup of individual code bits and code reuse for `clean::Attribute` handling. The only change in behaviour should be that emitted sources are now being recorded and queried when trying to create src-links to local source-files. r? @alexcrichton
2016-03-06Split out rustdoc pass to strip private importsmitaa-8/+51
2016-03-06Auto merge of #30884 - durka:inclusive-ranges, r=aturonbors-390/+983
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges. This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals. - For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion. - I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate. - There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging. cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq) cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254 relevant to #28237 (tracking issue)
2016-03-06Auto merge of #31920 - jseyfried:fix_spurious_privacy_error, r=nikomatsakisbors-73/+67
This PR allows using methods from traits that are visible but are defined in an inaccessible module (fixes #18241). For example, ```rust mod foo { pub use foo::bar::Tr; mod bar { // This module is inaccessible from `g` pub trait Tr { fn f(&self) {} } } } fn g<T: foo::Tr>(t: T) { t.f(); // Currently, this is a privacy error even though `foo::Tr` is visible } ``` After this PR, it will continue to be a privacy error to use a method from a trait that is not visible. This can happen when a public trait inherits from a private trait (in violation of the `public_in_private` lint) -- see @petrochenkov's example in #28504. r? @nikomatsakis
2016-03-05Auto merge of #31889 - alexcrichton:update-jemalloc-again, r=nikomatsakisbors-36/+28
Now that https://github.com/jemalloc/jemalloc/commit/767d85061a6fb88ec977bbcd9b429a43aff391e6 is upstream, the relevant deadlocking issue which prompted our downgrade has been resolved. As a result, there's no known issue to *not* upgrade! This also re-enables jemalloc for the pc-windows-gnu target as known issues with that have also been fixed. Closes #31030
2016-03-05Auto merge of #31726 - jseyfried:improve_import_resolution, r=nikomatsakisbors-305/+388
This PR improves the import resolution algorithm. First, it records that an import succeeded or failed for one namespace (by calling `decrement_outstanding_references_for` and `try_define_child` if successful) even if it is still indeterminate in the other namespace, fixing #31444. Second, it starts importing bindings from globs as soon as the glob path is determined. It maintains links from imported modules to their importers so that when a resolution becomes successful in an imported module, a corresponding binding will be added to the importer module. It also maintains links from importer modules to imported modules so that we can determine if an undefined name is indeterminate or failing by recursively checking this in the imported modules. This allows, for example: ```rust mod foo { pub mod baz {} pub use bar::baz::*; } mod bar { pub use foo::*; } ``` It also allows cycles of pub glob imports, although by to the current shadowing rules, the only way for such a cycle to compile is if each participating module defines no names. Incidentally, this PR lays the groundwork for more permissive feature-gated shadowing rules. Finally, this PR encapsulates almost all implementation details of import resolution in `resolve_imports` (some of which used to be in `lib.rs`) and refactors reexport recording, shadowed trait collecting, some duplicate checking, and the `private_in_public` lint out of the core import resolution algorithm and into a post-processing pass in `resolve_imports`. r? @nrc
2016-03-05Auto merge of #31700 - oli-obk:skip_double_ended, r=alexcrichtonbors-0/+49
[Playground Example](https://play.rust-lang.org/?gist=66fdb4fe1cf4d8aa2ad4&version=stable)
2016-03-05adopt new header style to sidestep rust-lang-nursery/rustfmt#836Niko Matsakis-15/+9
2016-03-05apply rustfmt to librustc_data_structures, correcting ↵Niko Matsakis-355/+444
rust-lang-nursery/rustfmt#836
2016-03-04remove under/overflow from next_back/nextAlex Burka-6/+10
2016-03-04add underflow/overflow testsAlex Burka-0/+8
2016-03-04add more unstable annotationsAlex Burka-0/+15
2016-03-04Do not trigger unused_variables lint for variable modified through AddAssignUlrik Sverdrup-5/+30
Visit an overloaded += like a method call and not like an assignment.
2016-03-04Auto merge of #32046 - steveklabnik:rollup, r=steveklabnikbors-5/+34
- Successful merges: #32002, #32017, #32027, #32035, #32036 - Failed merges:
2016-03-04Finish encapsulating the details of import resolution in resolve_importsJeffrey Seyfried-79/+31
2016-03-04Refactor away defineJeffrey Seyfried-12/+6
2016-03-04Start importing bindings from globs as soon as the glob path is known.Jeffrey Seyfried-128/+232
2016-03-04Add a field in Module for the ResolverArenasJeffrey Seyfried-27/+39
2016-03-04Add an arena for import directivesJeffrey Seyfried-9/+18
2016-03-04Record that an import succeeded or failed in one namespace even while it is ↵Jeffrey Seyfried-74/+86
indeterminate in the other namespace (fixes #31444)
2016-03-04Add liveness test for unused_assignments for tricky lhsUlrik Sverdrup-0/+27
2016-03-04Do not trigger unused_assignments for overloaded AssignOpsUlrik Sverdrup-1/+21
If `v` were a type with some kind of indirection, so that `v += 1` would have an effect even if `v` were not used anymore, the unused_assignments lint would mark a false positive. This exempts overloaded (non-primitive) assign ops from being treated as assignments (they are method calls). The previous compile-fail tests that ensure x += 1 can trigger for primitive types continue to pass. Added a representative test for the "view" indirection.
2016-03-04Rollup merge of #32036 - Seeker14491:patch-1, r=steveklabnikSteve Klabnik-1/+1
To me it was unclear whether 'it' referred to the fold function, or the closure.
2016-03-04Rollup merge of #32035 - ubsan:master, r=blussSteve Klabnik-2/+0
Just take out the `NOTE` and the `#[allow(improper_ctypes)]`
2016-03-04Rollup merge of #32027 - japaric:rustbuild-mips, r=alexcrichtonSteve Klabnik-2/+2
These targets don't link statically to libunwind or libc --- r? @alexcrichton
2016-03-04Rollup merge of #32017 - brson:ignoretest, r=nikomatsakisSteve Klabnik-0/+1
2016-03-04Rollup merge of #32002 - srinivasreddy:vector_doc, r=ManishearthSteve Klabnik-0/+30
Issue here : https://github.com/rust-lang/rust/issues/31991
2016-03-04This doesn't seem necessary?mitaa-37/+17
2016-03-04Use const instead of functionmitaa-5/+3
2016-03-04Use `Item::is_*` methods consistentlymitaa-22/+26
2016-03-04Refactor rustdocs attribute handlingmitaa-136/+85
2016-03-04Don't treat associated types specially in `def_privacy`Jeffrey Seyfried-13/+7
Improve trait privacy error message
2016-03-04Add testJeffrey Seyfried-0/+30
2016-03-04privacy: change def_privacy so that it checks for visiblity instead of ↵Jeffrey Seyfried-68/+38
nameability
2016-03-04Simplify `if let`/`match` expressionsmitaa-319/+211
2016-03-04test: Clean up alloc_jemalloc usage in testsAlex Crichton-36/+28
Right now there's just a smattering of `// ignore-foo` platforms which is ever expanding as new ones are added. Instead switch to only running these tests on Linux/OSX and then use a guaranteed-to-work but not-as-well-tested alternative on other platforms.
2016-03-04std: Update jemalloc again to the 4.* trackAlex Crichton-0/+0
2016-03-04Auto merge of #32039 - arielb1:pat-enum, r=nagisabors-47/+58
Fixes #32004 r? @eddyb
2016-03-04Auto merge of #32032 - arielb1:load-const, r=eddybbors-9/+36
Fixes #30891 r? @eddyb
2016-03-04remove wrong assert in check_matchAriel Ben-Yehuda-4/+21
the assert was invalidated by PR #31020 Fixes #31561
2016-03-04don't treat unit patterns as wildcard patternsAriel Ben-Yehuda-1/+30
Fixes #32004
2016-03-04Auto merge of #32022 - gohyda:master, r=alexcrichtonbors-3/+7
- Empty `.sidebar .location` caused "grey line" on top of the documentation page (under 700px) fixed. - `.sidebar .location` appearance improvement in responsive mode.