]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agorustc: split off most of ty::print::PrintCx's fields into a separate struct.
Eduard-Mihai Burtescu [Thu, 10 Jan 2019 11:26:35 +0000 (13:26 +0200)]
rustc: split off most of ty::print::PrintCx's fields into a separate struct.

5 years agorustc: uniformize ty::print's error handling by requiring Result.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 14:30:10 +0000 (16:30 +0200)]
rustc: uniformize ty::print's error handling by requiring Result.

5 years agorustc: rename ppaux' print macro to just p and make its cx input implicit.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 11:05:05 +0000 (13:05 +0200)]
rustc: rename ppaux' print macro to just p and make its cx input implicit.

5 years agorustc: make ppaux' print macro use only one closure.
Eduard-Mihai Burtescu [Wed, 9 Jan 2019 10:13:39 +0000 (12:13 +0200)]
rustc: make ppaux' print macro use only one closure.

5 years agorustc: replace node_path_str with uses of def_path_str.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 08:08:30 +0000 (10:08 +0200)]
rustc: replace node_path_str with uses of def_path_str.

5 years agorustc: remove `ty::print::FORCE_ABSOLUTE` altogether.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 05:27:44 +0000 (07:27 +0200)]
rustc: remove `ty::print::FORCE_ABSOLUTE` altogether.

5 years agorustc: assert `ty::print::FORCE_ABSOLUTE` isn't needed anymore.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 05:00:30 +0000 (07:00 +0200)]
rustc: assert `ty::print::FORCE_ABSOLUTE` isn't needed anymore.

5 years agorustc: move `...::<impl ...>` printing into `pretty_path_qualified`.
Eduard-Mihai Burtescu [Fri, 28 Dec 2018 04:09:22 +0000 (06:09 +0200)]
rustc: move `...::<impl ...>` printing into `pretty_path_qualified`.

5 years agorustc: move the `FORCE_IMPL_FILENAME_LINE` hack into `print_def_path`.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 18:08:01 +0000 (20:08 +0200)]
rustc: move the `FORCE_IMPL_FILENAME_LINE` hack into `print_def_path`.

5 years agorustc: move <...>-less impl path special-case to pretty_path_qualified.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 15:31:33 +0000 (17:31 +0200)]
rustc: move <...>-less impl path special-case to pretty_path_qualified.

5 years agorustc: merge PrintCx::parameterized and def_path printing.
Eduard-Mihai Burtescu [Fri, 21 Dec 2018 15:10:21 +0000 (17:10 +0200)]
rustc: merge PrintCx::parameterized and def_path printing.

5 years agorustc: integrate LocalPathPrinter's behavior into FmtPrinter.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 12:49:32 +0000 (14:49 +0200)]
rustc: integrate LocalPathPrinter's behavior into FmtPrinter.

5 years agorustc: move the contents of ty::item_path to ty::print.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 11:25:31 +0000 (13:25 +0200)]
rustc: move the contents of ty::item_path to ty::print.

5 years agorustc: rename item_path to def_path (except the module in ty).
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 10:31:35 +0000 (12:31 +0200)]
rustc: rename item_path to def_path (except the module in ty).

5 years agorustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 10:20:59 +0000 (12:20 +0200)]
rustc: remove TyCtxt::parent_def_id in favor of TyCtxt::parent.

5 years agorustc_mir: adjust the type_length_limit diagnostic to be more useful.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 04:39:33 +0000 (06:39 +0200)]
rustc_mir: adjust the type_length_limit diagnostic to be more useful.

5 years agorustc: pass Option<&Substs> and Namespace around in ty::item_path.
Eduard-Mihai Burtescu [Wed, 19 Dec 2018 03:01:06 +0000 (05:01 +0200)]
rustc: pass Option<&Substs> and Namespace around in ty::item_path.

5 years agorustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter.
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 16:28:29 +0000 (18:28 +0200)]
rustc: move the FORCE_IMPL_FILENAME_LINE handling into LocalPathPrinter.

5 years agorustc: explicitly pass the namespace to PrintCx::parameterized.
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 13:12:48 +0000 (15:12 +0200)]
rustc: explicitly pass the namespace to PrintCx::parameterized.

5 years agorustc: move the formatter into ty::print::PrintCx.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 14:10:22 +0000 (16:10 +0200)]
rustc: move the formatter into ty::print::PrintCx.

5 years agorustc: add a ty::RegionKind::display_outputs_anything method to avoid printing to...
Eduard-Mihai Burtescu [Wed, 12 Dec 2018 07:47:45 +0000 (09:47 +0200)]
rustc: add a ty::RegionKind::display_outputs_anything method to avoid printing to a string.

5 years agorustc: always rely on '_ to be not printed by ty::Region itself.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 15:36:24 +0000 (17:36 +0200)]
rustc: always rely on '_ to be not printed by ty::Region itself.

5 years agorustc: remove ty::item_path::RootMode by moving local logic into the printer.
Eduard-Mihai Burtescu [Mon, 10 Dec 2018 10:59:08 +0000 (12:59 +0200)]
rustc: remove ty::item_path::RootMode by moving local logic into the printer.

5 years agorustc: rewrite ty::item_path to be more functional than mutation-oriented.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 19:05:22 +0000 (21:05 +0200)]
rustc: rewrite ty::item_path to be more functional than mutation-oriented.

5 years agorustc_codegen_utils: revert some symbol_names refactors (while keeping the functional...
Eduard-Mihai Burtescu [Sun, 3 Feb 2019 10:24:29 +0000 (12:24 +0200)]
rustc_codegen_utils: revert some symbol_names refactors (while keeping the functional changes).

5 years agorustc: support impl's in PrintCx::parameterized.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 15:54:18 +0000 (17:54 +0200)]
rustc: support impl's in PrintCx::parameterized.

5 years agorustc: rewrite PrintCx::parameterized to be much simpler and more general.
Eduard-Mihai Burtescu [Sat, 8 Dec 2018 09:26:34 +0000 (11:26 +0200)]
rustc: rewrite PrintCx::parameterized to be much simpler and more general.

5 years agorustc: use define_print! to implement fmt::{Display,Debug} for Kind.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 23:13:23 +0000 (01:13 +0200)]
rustc: use define_print! to implement fmt::{Display,Debug} for Kind.

5 years agorustc: tie the 'tcx between Print and PrintCx in ty::print.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 15:40:23 +0000 (17:40 +0200)]
rustc: tie the 'tcx between Print and PrintCx in ty::print.

5 years agorustc: implement fmt::{Debug,Display} on Ty instead of TyS.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 18:10:47 +0000 (20:10 +0200)]
rustc: implement fmt::{Debug,Display} on Ty instead of TyS.

5 years agorustc: remove fmt::{Debug,Display} from ty::TyKind.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 17:14:30 +0000 (19:14 +0200)]
rustc: remove fmt::{Debug,Display} from ty::TyKind.

5 years agorustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 13:22:50 +0000 (15:22 +0200)]
rustc: keep a TyCtxt in PrintCx and use it instead of ty::tls.

5 years agorustc: rename PrintContext to PrintCx.
Eduard-Mihai Burtescu [Fri, 7 Dec 2018 14:17:44 +0000 (16:17 +0200)]
rustc: rename PrintContext to PrintCx.

5 years agorustc: don't support missing TLS TyCtxt in ty::print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 18:04:21 +0000 (20:04 +0200)]
rustc: don't support missing TLS TyCtxt in ty::print.

5 years agorustc: don't support `tcx.lift` returning `None` in ppaux.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:35:48 +0000 (19:35 +0200)]
rustc: don't support `tcx.lift` returning `None` in ppaux.

5 years agorustc: uniformize all lift expect messages to "could not lift for printing".
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:25:17 +0000 (19:25 +0200)]
rustc: uniformize all lift expect messages to "could not lift for printing".

5 years agorustc: add a 'tcx parameter to Print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:13:55 +0000 (19:13 +0200)]
rustc: add a 'tcx parameter to Print.

5 years agorustc: start moving util::ppaux to ty::print.
Eduard-Mihai Burtescu [Tue, 4 Dec 2018 17:13:37 +0000 (19:13 +0200)]
rustc: start moving util::ppaux to ty::print.

5 years agorustc: remove unnecessary extern_prelude logic from ty::item_path.
Eduard-Mihai Burtescu [Sun, 9 Dec 2018 20:42:08 +0000 (22:42 +0200)]
rustc: remove unnecessary extern_prelude logic from ty::item_path.

5 years agoAuto merge of #59181 - RalfJung:miri, r=oli-obk
bors [Thu, 14 Mar 2019 15:37:26 +0000 (15:37 +0000)]
Auto merge of #59181 - RalfJung:miri, r=oli-obk

update miri

Fixes https://github.com/rust-lang/rust/issues/59059

r? @oli-obk

5 years agoupdate miri
Ralf Jung [Thu, 14 Mar 2019 14:25:23 +0000 (15:25 +0100)]
update miri

5 years agoAuto merge of #58176 - Zoxc:lint-levels, r=oli-obk
bors [Thu, 14 Mar 2019 12:09:13 +0000 (12:09 +0000)]
Auto merge of #58176 - Zoxc:lint-levels, r=oli-obk

Only insert nodes which changes lint levels in the LintLevelMap

r? @eddyb

5 years agoAuto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister
bors [Thu, 14 Mar 2019 08:38:56 +0000 (08:38 +0000)]
Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoerister

Replace TimeLine LLVM profiling with the self profiler

5 years agoAuto merge of #59120 - alexreg:move-issue-tests-1, r=varkor
bors [Thu, 14 Mar 2019 01:28:18 +0000 (01:28 +0000)]
Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkor

Moved issue tests to subdirs and normalised names

Consistency, decluttering, ease of navigation :-)

r? @Centril

5 years agoMoved issue tests to subdirs and normalised names.
Alexander Regueiro [Tue, 12 Mar 2019 00:49:17 +0000 (00:49 +0000)]
Moved issue tests to subdirs and normalised names.

5 years agoAuto merge of #59143 - ehuss:update-cargo, r=ehuss
bors [Wed, 13 Mar 2019 18:26:45 +0000 (18:26 +0000)]
Auto merge of #59143 - ehuss:update-cargo, r=ehuss

Update cargo

6 commits in 95b45eca19ac785263fed98ecefe540bb47337ac..0e35bd8af0ec72d3225c4819b330b94628f0e9d0
2019-03-06 19:24:30 +0000 to 2019-03-13 06:52:51 +0000
- Make `hg` optional for tests. (rust-lang/cargo#6739)
- Fingerprint build script deps only for path packages. (rust-lang/cargo#6734)
- Add --quiet option for `cargo test` (rust-lang/cargo#6358)
- .gitignore should end with a newline. (rust-lang/cargo#6732)
- Emit warning on misspelled environment variables (rust-lang/cargo#6694)
- Update glob requirement from 0.2.11 to 0.3.0 (rust-lang/cargo#6724)

5 years agoUpdate cargo
Eric Huss [Tue, 12 Mar 2019 20:34:47 +0000 (13:34 -0700)]
Update cargo

5 years agoAuto merge of #58349 - petrochenkov:uni201x, r=pnkfelix
bors [Wed, 13 Mar 2019 14:59:05 +0000 (14:59 +0000)]
Auto merge of #58349 - petrochenkov:uni201x, r=pnkfelix

resolve: Simplify import resolution for mixed 2015/2018 edition mode

Non-controversial part of https://github.com/rust-lang/rust/pull/57745.

Before:

| Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
| ------------- |----------------|-----------------------------------------|------------------------------------------------|
| 2018          | Any            | Uniform                                 | Extern prelude                                 |
| 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
| 2015          | 2018           | Crate-relative with fallback to Uniform (future-proofed to error if the result is not Crate-relative or from Extern prelude) | Crate-relative with fallback to Extern prelude |

After:

| Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
| ------------- |----------------|-----------------------------------------|------------------------------------------------|
| 2018          | Any            | Uniform                                 | Extern prelude                                 |
| 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
| 2015          | 2018           | Crate-relative with fallback to Extern prelude | Crate-relative with fallback to Extern prelude |

I.e. only the behavior of the mixed local-2015-global-2018 mode is changed.
This mixed mode has two goals:
- Address regressions from https://github.com/rust-lang/rust/pull/56053#issuecomment-440826397.
Both "before" and "after" variants address those regressions.
- Be retrofit-able to "full 2015" edition (https://github.com/rust-lang/rust/pull/57745).
Any more complex fallback scheme (with more candidates) than "Crate-relative with fallback to Extern prelude" will give more regressions than https://github.com/rust-lang/rust/pull/57745#issuecomment-455855089 and is therefore less retrofit-able while also being, well, more complex.
So, we can settle on "Crate-relative with fallback to Extern prelude".

(I'll hopefully proceed with https://github.com/rust-lang/rust/pull/57745 after mid-February.)

r? @Centril

5 years agoAuto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister
bors [Wed, 13 Mar 2019 11:36:46 +0000 (11:36 +0000)]
Auto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister

Use derive macro for HashStable

Blocked on https://github.com/rust-lang/rust/pull/56795

5 years agoAuto merge of #59151 - Centril:rollup, r=Centril
bors [Wed, 13 Mar 2019 03:30:20 +0000 (03:30 +0000)]
Auto merge of #59151 - Centril:rollup, r=Centril

Rollup of 16 pull requests

Successful merges:

 - #58829 (librustc_interface: Update scoped-tls to 1.0)
 - #58876 (Parse lifetimes that start with a number and give specific error)
 - #58908 (Update rand version)
 - #58998 (Fix documentation of from_ne_bytes and from_le_bytes)
 - #59056 (Use lifetime contravariance to elide more lifetimes in core+alloc+std)
 - #59057 (Standardize `Range*` documentation)
 - #59080 (Fix incorrect links in librustc_codegen_llvm documentation)
 - #59083 (Fix #54822 and associated faulty tests)
 - #59093 (Remove precompute_in_scope_traits_hashes)
 - #59101 (Reduces Code Repetitions like `!n >> amt`)
 - #59121 (impl FromIterator for Result: Use assert_eq! instead of assert!)
 - #59124 (Replace assert with assert_eq)
 - #59129 (Visit impl Trait for dead_code lint)
 - #59130 (Note that NonNull does not launder shared references for mutation)
 - #59132 (ignore higher-ranked object bound conditions created by WF)
 - #59138 (Simplify Iterator::{min, max})

Failed merges:

r? @ghost

5 years agoRollup merge of #59138 - timvermeulen:simplify_select_fold1, r=sfackler
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:57 +0000 (03:33 +0100)]
Rollup merge of #59138 - timvermeulen:simplify_select_fold1, r=sfackler

Simplify Iterator::{min, max}

This PR simplifies the `select_fold1` helper method used to implmement `Iterator::{min, min_by, min_by_key, max, max_by, max_by_key}` by removing the projection argument, which was only used by the implementations of `min_by_key` and `max_by_key`.

I also added tests to ensure that the stability as mentioned in the comments of `min` and `max` is preserved, and fixed the `iter::{bench_max, bench_max_by_key}` benchmarks which the compiler presumably was able to collapse into closed-form expressions. None of the benchmark results were impacted, I suspect their generated assembly didn't change.

5 years agoRollup merge of #59132 - nikomatsakis:issue-53548-generator-bound, r=pnkfelix
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:56 +0000 (03:33 +0100)]
Rollup merge of #59132 - nikomatsakis:issue-53548-generator-bound, r=pnkfelix

ignore higher-ranked object bound conditions created by WF

In the `issue-53548` test added in this PR, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`.  Pursuant with
our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions).

Fixes #53548

r? @pnkfelix

5 years agoRollup merge of #59130 - RalfJung:non-null, r=rkruppe
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:54 +0000 (03:33 +0100)]
Rollup merge of #59130 - RalfJung:non-null, r=rkruppe

Note that NonNull does not launder shared references for mutation

See https://users.rust-lang.org/t/relative-pointer-an-abstraction-to-build-movable-self-referential-types/26186/6

5 years agoRollup merge of #59129 - sanxiyn:visit-impl-trait, r=varkor
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:53 +0000 (03:33 +0100)]
Rollup merge of #59129 - sanxiyn:visit-impl-trait, r=varkor

Visit impl Trait for dead_code lint

Fix #59085.

5 years agoRollup merge of #59124 - sntdevco:master, r=Centril
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:51 +0000 (03:33 +0100)]
Rollup merge of #59124 - sntdevco:master, r=Centril

Replace assert with assert_eq

Use `assert_eq!` instead of `assert!` for the tests

5 years agoRollup merge of #59121 - czipperz:fix_assert_result_fromiterater, r=Centril
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:50 +0000 (03:33 +0100)]
Rollup merge of #59121 - czipperz:fix_assert_result_fromiterater, r=Centril

impl FromIterator for Result: Use assert_eq! instead of assert!

5 years agoRollup merge of #59101 - kenta7777:reduce-code-repetition, r=oli-obk
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:49 +0000 (03:33 +0100)]
Rollup merge of #59101 - kenta7777:reduce-code-repetition, r=oli-obk

Reduces Code Repetitions like `!n >> amt`

Fixes #49937 .
This PR contains defining a function which operates bit inversion and reducing bit operation like `!0u128 >> (128 - size.bits())`.

5 years agoRollup merge of #59093 - Zoxc:no-prealloc, r=michaelwoerister
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:47 +0000 (03:33 +0100)]
Rollup merge of #59093 - Zoxc:no-prealloc, r=michaelwoerister

Remove precompute_in_scope_traits_hashes

r? @michaelwoerister

5 years agoRollup merge of #59083 - kyren:master, r=varkor
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:46 +0000 (03:33 +0100)]
Rollup merge of #59083 - kyren:master, r=varkor

Fix #54822 and associated faulty tests

Type checking associated constants can require trait bounds, but an empty
parameter environment was provided to the trait solver.  Providing an
appropriate parameter environment seems to fix #54822 and also make one of the
cases in src/test/ui/nll/trait-associated-constant.rs that should compile
successfully do so.  It also (slightly) improves the error message in
src/test/ui/associated-const/associated-const-generic-obligations.rs

5 years agoRollup merge of #59080 - nbaksalyar:fix-llvm-codegen-doc, r=frewsxcv
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:44 +0000 (03:33 +0100)]
Rollup merge of #59080 - nbaksalyar:fix-llvm-codegen-doc, r=frewsxcv

Fix incorrect links in librustc_codegen_llvm documentation

5 years agoRollup merge of #59057 - czipperz:standardize_range_documentation, r=shepmaster
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:43 +0000 (03:33 +0100)]
Rollup merge of #59057 - czipperz:standardize_range_documentation, r=shepmaster

Standardize `Range*` documentation

This updates the final example in the documentation for the types
`Range`, `RangeFrom`, `RangeFull`, `RangeInclusive`, `RangeTo`,
`RangeToInclusive`.

5 years agoRollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:41 +0000 (03:33 +0100)]
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler

Use lifetime contravariance to elide more lifetimes in core+alloc+std

Sample:
```diff
-    impl<'a, 'b, A: ?Sized, B: ?Sized> PartialEq<&'b mut B> for &'a mut A where A: PartialEq<B> {
+    impl<A: ?Sized, B: ?Sized> PartialEq<&mut B> for &mut A where A: PartialEq<B> {
         #[inline]
-        fn eq(&self, other: &&'b mut B) -> bool { PartialEq::eq(*self, *other) }
+        fn eq(&self, other: &&mut B) -> bool { PartialEq::eq(*self, *other) }
         #[inline]
-        fn ne(&self, other: &&'b mut B) -> bool { PartialEq::ne(*self, *other) }
+        fn ne(&self, other: &&mut B) -> bool { PartialEq::ne(*self, *other) }
     }
```

[I didn't know this worked](https://internals.rust-lang.org/t/why-can-you-use-different-unconstrained-lifetimes-to-implement-traits/9544/2?u=scottmcm) until recently, but since defining methods contravariantly in their lifetimes this way has worked back to Rust 1.0, we might as well take advantage of combining it with IHLE.

5 years agoRollup merge of #58998 - xTibor:doc_from_bytes, r=scottmcm
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:39 +0000 (03:33 +0100)]
Rollup merge of #58998 - xTibor:doc_from_bytes, r=scottmcm

Fix documentation of from_ne_bytes and from_le_bytes

Copypasta mistake, the documentation of `from_ne_bytes` and `from_le_bytes` used the big-endian variant in the example snippets.

5 years agoRollup merge of #58908 - JohnTitor:improve-rand, r=scottmcm
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:37 +0000 (03:33 +0100)]
Rollup merge of #58908 - JohnTitor:improve-rand, r=scottmcm

Update rand version

cc: #57724

r? @scottmcm

5 years agoRollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkov
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:36 +0000 (03:33 +0100)]
Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkov

Parse lifetimes that start with a number and give specific error

Fix #58786.

5 years agoRollup merge of #58829 - Xanewok:scoped-tls, r=Zoxc
Mazdak Farrokhzad [Wed, 13 Mar 2019 02:33:34 +0000 (03:33 +0100)]
Rollup merge of #58829 - Xanewok:scoped-tls, r=Zoxc

librustc_interface: Update scoped-tls to 1.0

Done previously as a part of https://github.com/rust-lang/rust/pull/58748.

r? @Zoxc

5 years agoAdd missing project attributes
John Kåre Alsaker [Tue, 12 Mar 2019 23:08:36 +0000 (00:08 +0100)]
Add missing project attributes

5 years agoUse derive macro for HashStable
John Kåre Alsaker [Mon, 3 Dec 2018 00:14:35 +0000 (01:14 +0100)]
Use derive macro for HashStable

5 years agoFix newtype_index
John Kåre Alsaker [Sat, 9 Mar 2019 21:04:00 +0000 (22:04 +0100)]
Fix newtype_index

5 years agoRename test struct names to something more sensible
kyren [Tue, 12 Mar 2019 22:33:27 +0000 (18:33 -0400)]
Rename test struct names to something more sensible

5 years agoAuto merge of #58743 - varkor:bulk-needstest-1, r=alexcrichton
bors [Tue, 12 Mar 2019 22:15:07 +0000 (22:15 +0000)]
Auto merge of #58743 - varkor:bulk-needstest-1, r=alexcrichton

Add tests for several E-needstest issues

This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise.

Closes https://github.com/rust-lang/rust/issues/10876.
Closes https://github.com/rust-lang/rust/issues/26448.
Closes https://github.com/rust-lang/rust/issues/26577.
Closes https://github.com/rust-lang/rust/issues/26619.
Closes https://github.com/rust-lang/rust/issues/27054.
Closes https://github.com/rust-lang/rust/issues/44127.
Closes https://github.com/rust-lang/rust/issues/44255.
Closes https://github.com/rust-lang/rust/issues/55731.
Closes https://github.com/rust-lang/rust/issues/57781.

5 years agoForward `max` and `min` to `max_by` and `min_by` respectively
Tim Vermeulen [Tue, 12 Mar 2019 19:24:10 +0000 (20:24 +0100)]
Forward `max` and `min` to `max_by` and `min_by` respectively

5 years agoRemove compiletest comments from tests
varkor [Tue, 12 Mar 2019 19:06:13 +0000 (19:06 +0000)]
Remove compiletest comments from tests

5 years agoAuto merge of #58015 - icefoxen:tryfrom-docs, r=SimonSapin
bors [Tue, 12 Mar 2019 18:58:23 +0000 (18:58 +0000)]
Auto merge of #58015 - icefoxen:tryfrom-docs, r=SimonSapin

Expand docs for `TryFrom` and `TryInto`.

The examples are still lacking for now, both for module docs and for methods/impl's.  Will be adding those in further pushes.

Should hopefully resolve the doc concern in #33417 when finished?

5 years agoresolve: Simplify import resolution for mixed 2015/2018 edition mode
Vadim Petrochenkov [Wed, 16 Jan 2019 23:17:22 +0000 (02:17 +0300)]
resolve: Simplify import resolution for mixed 2015/2018 edition mode

5 years agoAdd NLL test error output
varkor [Mon, 11 Mar 2019 23:06:34 +0000 (23:06 +0000)]
Add NLL test error output

5 years agoRemove invalid ASM tests
varkor [Sat, 9 Mar 2019 17:02:11 +0000 (17:02 +0000)]
Remove invalid ASM tests

These still fail on some architectures.

5 years agoIgnore WASM on asm tests
varkor [Sat, 2 Mar 2019 12:47:39 +0000 (12:47 +0000)]
Ignore WASM on asm tests

5 years agoUpdate test for issue #55731
varkor [Tue, 26 Feb 2019 20:56:52 +0000 (20:56 +0000)]
Update test for issue #55731

5 years agoAdd a test for #27054
varkor [Mon, 25 Feb 2019 23:57:08 +0000 (23:57 +0000)]
Add a test for #27054

5 years agoAdd a test for #26577
varkor [Mon, 25 Feb 2019 23:56:53 +0000 (23:56 +0000)]
Add a test for #26577

5 years agoAdd a test for #28587
varkor [Mon, 25 Feb 2019 23:56:27 +0000 (23:56 +0000)]
Add a test for #28587

5 years agoAdd a test for #22892
varkor [Mon, 25 Feb 2019 23:56:10 +0000 (23:56 +0000)]
Add a test for #22892

5 years agoAdd a test for #57781
varkor [Mon, 25 Feb 2019 23:55:43 +0000 (23:55 +0000)]
Add a test for #57781

5 years agoAdd a test for #55731
varkor [Mon, 25 Feb 2019 23:55:34 +0000 (23:55 +0000)]
Add a test for #55731

5 years agoAdd a test for #46101
varkor [Mon, 25 Feb 2019 23:55:25 +0000 (23:55 +0000)]
Add a test for #46101

5 years agoAdd a test for #44255
varkor [Mon, 25 Feb 2019 23:55:16 +0000 (23:55 +0000)]
Add a test for #44255

5 years agoAdd a test for #44127
varkor [Mon, 25 Feb 2019 23:55:08 +0000 (23:55 +0000)]
Add a test for #44127

5 years agoAdd a test for #26619
varkor [Mon, 25 Feb 2019 23:55:00 +0000 (23:55 +0000)]
Add a test for #26619

5 years agoAdd tests for #26448
varkor [Mon, 25 Feb 2019 23:54:49 +0000 (23:54 +0000)]
Add tests for #26448

5 years agoAdd a test for #10876
varkor [Mon, 25 Feb 2019 23:07:12 +0000 (23:07 +0000)]
Add a test for #10876

5 years agoAdd tests to ensure that Iterator::min and Iterator::max are stable
Tim Vermeulen [Tue, 12 Mar 2019 18:25:44 +0000 (19:25 +0100)]
Add tests to ensure that Iterator::min and Iterator::max are stable

5 years agoFix comment
Tim Vermeulen [Tue, 12 Mar 2019 16:53:25 +0000 (17:53 +0100)]
Fix comment

5 years agoRemove the projection part of select_fold1
Tim Vermeulen [Tue, 12 Mar 2019 16:52:26 +0000 (17:52 +0100)]
Remove the projection part of select_fold1

5 years agoFix the bench_max and bench_max_by_key benchmarks
Tim Vermeulen [Tue, 12 Mar 2019 16:52:10 +0000 (17:52 +0100)]
Fix the bench_max and bench_max_by_key benchmarks

5 years agoRemove stabilized feature gate in doctest
Simon Sapin [Tue, 12 Mar 2019 16:42:42 +0000 (17:42 +0100)]
Remove stabilized feature gate in doctest

5 years agoAuto merge of #58330 - GuillaumeGomez:rustdoc-js-non-std, r=QuietMisdreavus,Mark...
bors [Tue, 12 Mar 2019 15:33:59 +0000 (15:33 +0000)]
Auto merge of #58330 - GuillaumeGomez:rustdoc-js-non-std, r=QuietMisdreavus,Mark-Simulacrum

Add rustdoc JS non-std tests

@QuietMisdreavus: You asked it, here it is!

r? @QuietMisdreavus

5 years agoignore higher-ranked WF requirements for trait objects
Niko Matsakis [Tue, 12 Mar 2019 14:57:06 +0000 (10:57 -0400)]
ignore higher-ranked WF requirements for trait objects

In the `issue-53548` test added in this commit, the `Box<dyn Trait>`
type is expanded to `Box<dyn Trait + 'static>`, but the generator
"witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF
code was encountering an ICE (when debug-assertions were enabled) and
an unexpected compilation error (without debug-asserions) when trying
to process this `'r` region bound. In particular, to be WF, the region
bound must meet the requirements of the trait, and hence we got
`for<'r> { 'r: 'static }`. This would ICE because the `Binder`
constructor we were using was assering that no higher-ranked regions
were involved (because the WF code is supposed to skip those). The
error (if debug-asserions were disabled) came because we obviously
cannot prove that `'r: 'static` for any region `'r`.  Pursuant with
our "lazy WF" strategy for higher-ranked regions, the fix is not to
require that `for<'r> { 'r: 'static }` holds (this is also analogous
to what we would do for higher-ranked regions appearing within the
trait in other positions).

5 years agoadd a useful debug printout
Niko Matsakis [Tue, 12 Mar 2019 14:52:29 +0000 (10:52 -0400)]
add a useful debug printout

5 years agoexpand
Ralf Jung [Tue, 12 Mar 2019 12:44:09 +0000 (13:44 +0100)]
expand