]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #65821 - SimonSapin:in-place, r=Amanieu
bors [Tue, 19 Nov 2019 01:16:07 +0000 (01:16 +0000)]
Auto merge of #65821 - SimonSapin:in-place, r=Amanieu

Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.

4 years agofix rebase
Esteban Küber [Mon, 18 Nov 2019 19:01:02 +0000 (11:01 -0800)]
fix rebase

4 years agoAdd error code documentation
Esteban Küber [Mon, 18 Nov 2019 20:34:22 +0000 (12:34 -0800)]
Add error code documentation

4 years agoGenerate DWARF address ranges for faster lookups
Josh Stone [Mon, 18 Nov 2019 23:05:01 +0000 (15:05 -0800)]
Generate DWARF address ranges for faster lookups

This adds a new option `-Zgenerate-arange-section`, enabled by default,
corresponding to LLVM's `-generate-arange-section`. This creates a
`.debug_aranges` section with DWARF address ranges, which some tools
depend on to optimize address lookups (elfutils [22288], [25173]).

This only has effect when debuginfo is enabled, and the additional data
is small compared to the other debug sections. For example, libstd.so
with full debuginfo is about 11MB, with just 61kB in aranges.

[22288]: https://sourceware.org/bugzilla/show_bug.cgi?id=22288
[25173]: https://sourceware.org/bugzilla/show_bug.cgi?id=25173

Closes #45246.

4 years agoMove E0594 to new error code system
Guillaume Gomez [Mon, 18 Nov 2019 18:03:20 +0000 (19:03 +0100)]
Move E0594 to new error code system

4 years agotest: Update tests with fallout of changes
Gabriel Smith [Mon, 18 Nov 2019 19:57:46 +0000 (14:57 -0500)]
test: Update tests with fallout of changes

The error messages of the two tests effected degraded in quality. The
errors no longer suggest types in other modules as they now assume that
the arguments are const args, not type args.

4 years agotest: const-generics: Update tests removing unrequired braces
Gabriel Smith [Mon, 18 Nov 2019 19:57:23 +0000 (14:57 -0500)]
test: const-generics: Update tests removing unrequired braces

Braces were left in cases where generic args were in the generic const
paths.

4 years agorustc: lowering: Lower type args as const args when resolved in value
Gabriel Smith [Mon, 18 Nov 2019 19:30:01 +0000 (14:30 -0500)]
rustc: lowering: Lower type args as const args when resolved in value
namespace

4 years agoAuto merge of #58281 - mark-i-m:synthesis, r=estebank
bors [Mon, 18 Nov 2019 22:08:31 +0000 (22:08 +0000)]
Auto merge of #58281 - mark-i-m:synthesis, r=estebank

Add outlives suggestions for some lifetime errors

This PR implements suggestion diagnostics for some lifetime mismatch errors. When the borrow checker finds that some lifetime 'a doesn't outlive some other lifetime 'b that it should outlive, then in addition to the current lifetime error, we also emit a suggestion for how to fix the problem by adding a bound:

- If a and b are normal named regions, suggest to add the bound `'a: 'b`
- If b is static, suggest to replace a with static
- If b also needs to outlive a, they must be the same, so suggest unifying  them

We start with a simpler implementation that avoids diagnostic regression or implementation complexity:
- We only makes suggestions for lifetimes the user can already name (eg not closure regions or elided regions)
- For now, we only emit a help note, not an actually suggestion because it is significantly easier.

Finally, there is one hack: it seems that implicit regions in async fn are given the name '_ incorrectly. To avoid suggesting '_: 'x, we simply filter out such lifetimes by name.

For more info, see this internals thread:

https://internals.rust-lang.org/t/mechanical-suggestions-for-some-borrow-checker-errors/9049/3

TL;DR Make suggestions to add a `where 'a: 'b` constraint for some lifetime errors. Details are in the paper linked from the internals thread above.

r? @estebank

TODO
- [x] Clean up code
- [x] Only make idiomatic suggestions
     - [x] don't suggest naming `&'a self`
     - [x] rather than `'a: 'static`, suggest replacing `'a` with `'static`
     - [x] rather than `'a: 'b, 'b: 'a`, suggest replacing `'a` with `'b` or vice versa
- [x] Performance (maybe need a perf run when this is closer to the finish line?)
     - perf run was clean...
     - EDIT: perf run seems to only check non-error performance... How do we check that error performance didn't regress?
- [x] Needs ui tests
- [x] Integrate the `help` message into the main lifetime `error`

4 years agoresolve: late: Check if type arg is really a const arg
Gabriel Smith [Mon, 18 Nov 2019 19:24:13 +0000 (14:24 -0500)]
resolve: late: Check if type arg is really a const arg

A path type argument could be a generic const argument due to
limitations as to what we can determine at parsing. We double check just
to be sure by trying to resolve in the type namespace first, and if that
fails we try again in the value namespace. If resolution in the value
namespace succeeds, we have a generic const argument on our hands.

4 years agorustc: hir: Add method to check validity of a Res/Def in a namespace
Gabriel Smith [Mon, 18 Nov 2019 19:22:49 +0000 (14:22 -0500)]
rustc: hir: Add method to check validity of a Res/Def in a namespace

4 years agoresolve: Allow idents to resolve to primitives in the type namespace
Gabriel Smith [Mon, 18 Nov 2019 19:22:00 +0000 (14:22 -0500)]
resolve: Allow idents to resolve to primitives in the type namespace

4 years agoresolve: Give derive helpers highest priority during resolution
Vadim Petrochenkov [Mon, 18 Nov 2019 20:22:58 +0000 (23:22 +0300)]
resolve: Give derive helpers highest priority during resolution

4 years agoReword help and add test
Esteban Küber [Mon, 18 Nov 2019 20:08:03 +0000 (12:08 -0800)]
Reword help and add test

4 years agoAdd more context to `async fn` trait error. Suggest `async-trait`.
Agustin Fernandez [Tue, 29 Oct 2019 15:48:14 +0000 (11:48 -0400)]
Add more context to `async fn` trait error. Suggest `async-trait`.

4 years agoreview comments
Esteban Küber [Sun, 17 Nov 2019 19:27:48 +0000 (11:27 -0800)]
review comments

4 years agoAuto merge of #54733 - GuillaumeGomez:stabilize-rustdoc-theme, r=ollie27,Dylan-DPC
bors [Mon, 18 Nov 2019 19:03:21 +0000 (19:03 +0000)]
Auto merge of #54733 - GuillaumeGomez:stabilize-rustdoc-theme, r=ollie27,Dylan-DPC

Stabilize rustdoc theme options

Closes #54730

This PR stabilizes the `--themes` (now `--theme`) and `--theme-checker` (now `--check-theme`) options, for allowing users to add custom themes to their documentation.

Rustdoc includes two themes by default: `light` and `dark`. Using the `--theme` option, you can give rustdoc a CSS file to include as an extra theme for that render. Themes are named after the CSS file used, so using `--theme /path/to/your/custom-theme.css` will add a theme called `custom-theme` to the documentation.

Even though the CLI flag to add a theme is getting stabilized, there's no guarantee that a theme file will always have the same effect on documentation generated with future versions of rustdoc. To aid in ensuring that a theme will work, the flag `--check-theme` is also available, which compares the CSS rules defined by a custom theme against the ones used in the `light` theme. If the `light` theme defines a CSS rule that the custom theme does not, rustdoc will report an error. (Rustdoc also performs this check for themes given to `--theme`, but only reports a warning when a difference is found.)

4 years agoreview comments
Esteban Küber [Mon, 18 Nov 2019 18:33:05 +0000 (10:33 -0800)]
review comments

4 years agoSurround types with backticks in type errors
Esteban Küber [Fri, 15 Nov 2019 17:37:01 +0000 (09:37 -0800)]
Surround types with backticks in type errors

4 years agoRemove E0308 note when primary label has all info
Esteban Küber [Fri, 15 Nov 2019 07:45:30 +0000 (23:45 -0800)]
Remove E0308 note when primary label has all info

4 years agoreview comments: tweak prefix strings
Esteban Küber [Thu, 14 Nov 2019 22:08:08 +0000 (14:08 -0800)]
review comments: tweak prefix strings

4 years agoSpecific labels when referring to "expected" and "found" types
Esteban Küber [Wed, 13 Nov 2019 22:16:56 +0000 (14:16 -0800)]
Specific labels when referring to "expected" and "found" types

4 years agoUpdate test output
Aaron Hill [Fri, 15 Nov 2019 21:50:57 +0000 (16:50 -0500)]
Update test output

4 years agoReplace bool with new `FallbackMode` enum
Aaron Hill [Fri, 15 Nov 2019 21:24:51 +0000 (16:24 -0500)]
Replace bool with new `FallbackMode` enum

4 years agoAdd explanation of unconstrained opaque type
Aaron Hill [Fri, 15 Nov 2019 15:47:47 +0000 (10:47 -0500)]
Add explanation of unconstrained opaque type

4 years agoFix 'type annotations needed' error with opaque types
Aaron Hill [Fri, 15 Nov 2019 01:19:34 +0000 (20:19 -0500)]
Fix 'type annotations needed' error with opaque types

Related: #66426

This commit adds handling for opaque types during inference variable
fallback. Type variables generated from the instantiatino of opaque
types now fallback to the opque type itself.

Normally, the type variable for an instantiated opaque type is either
unified with the concrete type, or with the opaque type itself (e.g when
a function returns an opaque type by calling another function).

However, it's possible for the type variable to be left completely
unconstrained. This can occur in code like this:

```rust
pub type Foo = impl Copy;
fn produce() -> Option<Foo> {
    None
}
```

Here, we'll instantatiate the `Foo` in `Option<Foo>` to a fresh type
variable, but we will never unify it with anything due to the fact
that we return a `None`.

This results in the error message:

`type annotations needed: cannot resolve `_: std::marker::Copy``

pointing at `pub type Foo = impl Copy`.

This message is not only confusing, it's incorrect. When an opaque type
inference variable is completely unconstrained, we can always fall back
to using the opaque type itself. This effectively turns that particular
use of the opaque type into a non-defining use, even if it appears in a
defining scope.

4 years agoUpdate ui tests
Guillaume Gomez [Wed, 6 Nov 2019 12:58:44 +0000 (13:58 +0100)]
Update ui tests

4 years agoAdd long error explanation for E0594
Guillaume Gomez [Wed, 6 Nov 2019 12:58:38 +0000 (13:58 +0100)]
Add long error explanation for E0594

4 years agoMove `trait_ref_to_existential` to a closure
Esteban Küber [Sun, 17 Nov 2019 22:57:06 +0000 (14:57 -0800)]
Move `trait_ref_to_existential` to a closure

review comment

4 years agoFix Makefile themes check
Guillaume Gomez [Mon, 18 Nov 2019 17:53:45 +0000 (18:53 +0100)]
Fix Makefile themes check

4 years agoRemove redundant html check
Guillaume Gomez [Mon, 18 Nov 2019 15:49:44 +0000 (16:49 +0100)]
Remove redundant html check

4 years agoTweak diagnostics code
Nadrieril [Mon, 18 Nov 2019 15:47:51 +0000 (15:47 +0000)]
Tweak diagnostics code

4 years agoimprove error messages and documentation
Guillaume Gomez [Thu, 17 Oct 2019 12:26:21 +0000 (14:26 +0200)]
improve error messages and documentation

4 years agoremove -Z option from rustdoc theme checker tool
Guillaume Gomez [Sat, 12 Oct 2019 09:53:02 +0000 (11:53 +0200)]
remove -Z option from rustdoc theme checker tool

4 years agoApply review comments
Guillaume Gomez [Thu, 10 Oct 2019 10:09:01 +0000 (12:09 +0200)]
Apply review comments

4 years agoRename rustdoc options --themes and --check-themes to --theme and --check-theme
Guillaume Gomez [Sun, 22 Sep 2019 20:35:25 +0000 (22:35 +0200)]
Rename rustdoc options --themes and --check-themes to --theme and --check-theme

4 years agoremove unstable docs
Guillaume Gomez [Sat, 14 Sep 2019 15:43:19 +0000 (17:43 +0200)]
remove unstable docs

4 years agorename check-theme option into check-themes
Guillaume Gomez [Sat, 14 Sep 2019 15:43:10 +0000 (17:43 +0200)]
rename check-theme option into check-themes

4 years agoImprove documentation, add checks for themes option arguments, make sure the themes...
Guillaume Gomez [Wed, 21 Aug 2019 13:48:26 +0000 (15:48 +0200)]
Improve documentation, add checks for themes option arguments, make sure the themes file names are js compatible

4 years agoFix typos
Guillaume Gomez [Fri, 26 Jul 2019 08:15:23 +0000 (10:15 +0200)]
Fix typos

Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
4 years agoRename theme-checker option to check-theme
Guillaume Gomez [Sun, 30 Jun 2019 17:24:32 +0000 (19:24 +0200)]
Rename theme-checker option to check-theme

4 years agoAdd sentence to tell other options are ignored when running check-theme
Guillaume Gomez [Sun, 30 Jun 2019 17:23:45 +0000 (19:23 +0200)]
Add sentence to tell other options are ignored when running check-theme

4 years agoPrevent invalid html characters in themes name
Guillaume Gomez [Sun, 30 Jun 2019 17:09:58 +0000 (19:09 +0200)]
Prevent invalid html characters in themes name

4 years agoadd test for rustdoc's --themes flag
QuietMisdreavus [Fri, 24 May 2019 19:04:45 +0000 (14:04 -0500)]
add test for rustdoc's --themes flag

4 years agoApply review comments
Guillaume Gomez [Fri, 24 May 2019 08:39:49 +0000 (10:39 +0200)]
Apply review comments

4 years agoWarn instead of failing for themes
Guillaume Gomez [Thu, 23 May 2019 11:45:30 +0000 (13:45 +0200)]
Warn instead of failing for themes

4 years agoAdd documentation for stabilized flags
Guillaume Gomez [Thu, 23 May 2019 11:45:08 +0000 (13:45 +0200)]
Add documentation for stabilized flags

4 years agoStabilize rustdoc theme options
Guillaume Gomez [Mon, 1 Oct 2018 20:28:12 +0000 (22:28 +0200)]
Stabilize rustdoc theme options

4 years agoUpdate src/test/ui/pattern/issue-53820-slice-pattern-large-array.rs
Nadrieril Feneanar [Mon, 18 Nov 2019 15:40:49 +0000 (15:40 +0000)]
Update src/test/ui/pattern/issue-53820-slice-pattern-large-array.rs

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoUse `drop_in_place` in `array::IntoIter::drop`
Simon Sapin [Fri, 25 Oct 2019 16:11:20 +0000 (18:11 +0200)]
Use `drop_in_place` in `array::IntoIter::drop`

This skips the loop when the element type is known not to have drop glue, even in debug mode.

4 years agoFix selected crate search filter
Guillaume Gomez [Mon, 18 Nov 2019 13:11:21 +0000 (14:11 +0100)]
Fix selected crate search filter

4 years agoAuto merge of #66459 - eddyb:update-llvm-wasm-dwarf, r=alexcrichton
bors [Mon, 18 Nov 2019 09:14:12 +0000 (09:14 +0000)]
Auto merge of #66459 - eddyb:update-llvm-wasm-dwarf, r=alexcrichton

Update src/llvm-project to include rust-lang/llvm-project#27.

See https://github.com/rust-lang/llvm-project/pull/27, which works around https://github.com/rust-lang/llvm-project/pull/20#discussion_r344425408 (where I stumbled over some UB in DWARF emission for WASM, resulting in non-deterministic output).

r? @alexcrichton cc @yurydelendik

4 years agostd::error::Chain: remove Copy
Harald Hoyer [Fri, 15 Nov 2019 13:29:35 +0000 (14:29 +0100)]
std::error::Chain: remove Copy

remove Copy from Iterator as per comment
https://github.com/rust-lang/rust/issues/58520#issuecomment-553682166

4 years agoRename generated lifetime.
Camille GILLOT [Fri, 15 Nov 2019 17:58:40 +0000 (18:58 +0100)]
Rename generated lifetime.

4 years agoRetire EnumLiftImpl.
Camille GILLOT [Fri, 15 Nov 2019 17:30:20 +0000 (18:30 +0100)]
Retire EnumLiftImpl.

4 years agoRetire BraceStructLiftImpl.
Camille GILLOT [Fri, 15 Nov 2019 17:19:52 +0000 (18:19 +0100)]
Retire BraceStructLiftImpl.

4 years agoCreate derive proc-macro for Lift trait.
Camille GILLOT [Thu, 14 Nov 2019 22:31:49 +0000 (23:31 +0100)]
Create derive proc-macro for Lift trait.

4 years agoAuto merge of #66396 - smmalis37:pythontest, r=alexcrichton
bors [Mon, 18 Nov 2019 06:09:04 +0000 (06:09 +0000)]
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton

Make a test compatible across python versions.

Progress on #65063

This PR allows this test to work on both python2 and python3, ~~and it also allows `./x.py test` to fully complete on my system without python2 installed at all.~~

4 years agoAuto merge of #66238 - ehuss:stabilize-rustdoc-edition, r=GuillaumeGomez
bors [Mon, 18 Nov 2019 03:06:42 +0000 (03:06 +0000)]
Auto merge of #66238 - ehuss:stabilize-rustdoc-edition, r=GuillaumeGomez

rustdoc: Stabilize `edition` annotation.

The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:

```rust
/// ```edition2018
/// // This code block was ignored on stable.
/// ```

/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```
```

AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.

Closes #65980

4 years agoAuto merge of #65456 - estebank:trait-bound-borrow, r=matthewjasper
bors [Mon, 18 Nov 2019 00:05:38 +0000 (00:05 +0000)]
Auto merge of #65456 - estebank:trait-bound-borrow, r=matthewjasper

Suggest borrowing when it would satisfy an unmet trait bound

When there are multiple implementors for the same trait that is present
in an unmet binding, modify the E0277 error to refer to the parent
obligation and verify whether borrowing the argument being passed in
would satisfy the unmet bound. If it would, suggest it.

Fix #56368.

4 years agoreview comments
Esteban Küber [Thu, 14 Nov 2019 19:29:01 +0000 (11:29 -0800)]
review comments

4 years agoDo not ICE on trait aliases with missing obligations
Esteban Küber [Thu, 14 Nov 2019 00:06:28 +0000 (16:06 -0800)]
Do not ICE on trait aliases with missing obligations

4 years agoSimplify impl for SymbolStr.
Camille GILLOT [Sat, 16 Nov 2019 10:59:46 +0000 (11:59 +0100)]
Simplify impl for SymbolStr.

4 years agoRemove extern crate.
Camille GILLOT [Sat, 16 Nov 2019 10:53:44 +0000 (11:53 +0100)]
Remove extern crate.

4 years agoDerive HashStable_Generic for ABI types.
Camille GILLOT [Sat, 16 Nov 2019 10:52:00 +0000 (11:52 +0100)]
Derive HashStable_Generic for ABI types.

4 years agoImplement HashStable for RangeInclusive.
Camille GILLOT [Sat, 16 Nov 2019 10:45:57 +0000 (11:45 +0100)]
Implement HashStable for RangeInclusive.

4 years agoDerive HashStable for PanicStrategy.
Camille GILLOT [Sat, 9 Nov 2019 22:32:17 +0000 (23:32 +0100)]
Derive HashStable for PanicStrategy.

4 years agoHashStable in libsyntax.
Camille GILLOT [Sat, 9 Nov 2019 22:18:36 +0000 (23:18 +0100)]
HashStable in libsyntax.

4 years agoDerive HashStable in librustc_target.
Camille GILLOT [Sat, 9 Nov 2019 21:57:25 +0000 (22:57 +0100)]
Derive HashStable in librustc_target.

4 years agoHashStable_Generic for librustc_target.
Camille GILLOT [Sat, 9 Nov 2019 21:27:52 +0000 (22:27 +0100)]
HashStable_Generic for librustc_target.

4 years agoHashStable_Generic for libsyntax_pos.
Camille GILLOT [Sat, 9 Nov 2019 21:25:30 +0000 (22:25 +0100)]
HashStable_Generic for libsyntax_pos.

4 years agoHashStable literals in libsyntax.
Camille GILLOT [Sat, 9 Nov 2019 21:02:24 +0000 (22:02 +0100)]
HashStable literals in libsyntax.

4 years agoFurther HashStable_Generic derives.
Camille GILLOT [Sat, 9 Nov 2019 20:34:12 +0000 (21:34 +0100)]
Further HashStable_Generic derives.

4 years agoMove impl HashStable for Symbol in libsyntax_pos.
Camille GILLOT [Sat, 9 Nov 2019 20:17:21 +0000 (21:17 +0100)]
Move impl HashStable for Symbol in libsyntax_pos.

4 years agoMove impl HashStable for SymbolStr in libsyntax_pos.
Camille GILLOT [Sat, 9 Nov 2019 20:07:58 +0000 (21:07 +0100)]
Move impl HashStable for SymbolStr in libsyntax_pos.

4 years agoUse proc_macro for HashStable derive in libsyntax.
Camille GILLOT [Sat, 9 Nov 2019 19:56:19 +0000 (20:56 +0100)]
Use proc_macro for HashStable derive in libsyntax.

4 years agoCreate a generic HashStable derive.
Camille GILLOT [Sat, 9 Nov 2019 19:34:55 +0000 (20:34 +0100)]
Create a generic HashStable derive.

4 years ago`ConstantValue` is the only other ctor allowed when subtracting from slice ctors
Nadrieril [Sun, 17 Nov 2019 19:24:48 +0000 (19:24 +0000)]
`ConstantValue` is the only other ctor allowed when subtracting from slice ctors

4 years agoStore SliceKinds directly when subtracting
Nadrieril [Sun, 17 Nov 2019 19:08:01 +0000 (19:08 +0000)]
Store SliceKinds directly when subtracting

4 years agoAuto merge of #66385 - ecstatic-morse:check-only-pass2, r=eddyb
bors [Sun, 17 Nov 2019 18:38:15 +0000 (18:38 +0000)]
Auto merge of #66385 - ecstatic-morse:check-only-pass2, r=eddyb

Make dataflow-based const qualification the canonical one

For over a month, dataflow-based const qualification has been running in parallel with `qualify_consts` to check the bodies of `const` and `static`s. This PR removes the old qualification pass completely in favor of the dataflow-based one.

**edit:**
This PR also stops checking `QUALIF_ERROR_BIT` during promotion. This check appears to no longer serve a purpose now that the CTFE engine is more robust.

As a side-effect, this resolves #66167.

r? @eddyb

4 years agoSmall improvement to exhaustiveness diagnostics
Nadrieril [Sun, 17 Nov 2019 17:48:45 +0000 (17:48 +0000)]
Small improvement to exhaustiveness diagnostics

4 years agoFactor out slice constructor struct and simplify
Nadrieril [Sun, 17 Nov 2019 17:33:39 +0000 (17:33 +0000)]
Factor out slice constructor struct and simplify

4 years agorustc_metadata: Cleanup crate search with exact paths
Vadim Petrochenkov [Sun, 17 Nov 2019 16:21:43 +0000 (19:21 +0300)]
rustc_metadata: Cleanup crate search with exact paths

4 years agorustc_metadata: Remove `CrateMetadata::is_proc_macro_crate`
Vadim Petrochenkov [Sun, 17 Nov 2019 15:54:22 +0000 (18:54 +0300)]
rustc_metadata: Remove `CrateMetadata::is_proc_macro_crate`

4 years agorustc_metadata: Stop leaking `Lazy` from the `rmeta` module
Vadim Petrochenkov [Sun, 17 Nov 2019 15:46:38 +0000 (18:46 +0300)]
rustc_metadata: Stop leaking `Lazy` from the `rmeta` module

4 years agorustc_metadata: Move `CrateMetadata` into `decoder.rs`
Vadim Petrochenkov [Sun, 17 Nov 2019 13:50:46 +0000 (16:50 +0300)]
rustc_metadata: Move `CrateMetadata` into `decoder.rs`

It allows to make most of its fields private

4 years agorustc_metadata: Give a constructor to `CratePaths`
Vadim Petrochenkov [Sun, 17 Nov 2019 13:13:46 +0000 (16:13 +0300)]
rustc_metadata: Give a constructor to `CratePaths`

4 years agorustc_metadata: Minor cleanup
Vadim Petrochenkov [Sun, 17 Nov 2019 13:09:14 +0000 (16:09 +0300)]
rustc_metadata: Minor cleanup

4 years agorustc_metadata: Give a constructor to `CrateMetadata`
Vadim Petrochenkov [Sun, 17 Nov 2019 12:27:49 +0000 (15:27 +0300)]
rustc_metadata: Give a constructor to `CrateMetadata`

4 years agorustc_metadata: Give a constructor to `CrateLocator`
Vadim Petrochenkov [Sun, 17 Nov 2019 11:49:23 +0000 (14:49 +0300)]
rustc_metadata: Give a constructor to `CrateLocator`

4 years agorustc_metadata: `locator::Context` -> `CrateLocator`
Vadim Petrochenkov [Sun, 17 Nov 2019 11:17:24 +0000 (14:17 +0300)]
rustc_metadata: `locator::Context` -> `CrateLocator`

4 years agorustc_metadata: Move some structs from `cstore` to `decoder`
Vadim Petrochenkov [Sun, 17 Nov 2019 10:47:30 +0000 (13:47 +0300)]
rustc_metadata: Move some structs from `cstore` to `decoder`

This allows to privatize their fields.

4 years agoUnify the various slice constructors
Nadrieril [Sun, 17 Nov 2019 15:54:44 +0000 (15:54 +0000)]
Unify the various slice constructors

4 years agoAdd JohnTitor to rustc-guide toolstate notification list
Yuki Okushi [Sun, 17 Nov 2019 15:47:38 +0000 (00:47 +0900)]
Add JohnTitor to rustc-guide toolstate notification list

Also update org names of some books

4 years agoAuto merge of #66384 - cjgillot:typefoldable, r=Zoxc
bors [Sun, 17 Nov 2019 15:25:10 +0000 (15:25 +0000)]
Auto merge of #66384 - cjgillot:typefoldable, r=Zoxc

Derive TypeFoldable using a proc-macro

A new proc macro is added in librustc_macros.
It is used to derive TypeFoldable inside librustc and librustc_traits.

For now, the macro uses the `'tcx` lifetime implicitly, and does not allow for a more robust selection of the adequate lifetime.

The Clone-based TypeFoldable implementations are not migrated.

Closes #65674

4 years agoAuto merge of #66488 - RalfJung:miri, r=RalfJung
bors [Sun, 17 Nov 2019 10:45:37 +0000 (10:45 +0000)]
Auto merge of #66488 - RalfJung:miri, r=RalfJung

update Miri

r? @ghost Cc @oli-obk

4 years agoupdate Miri
Ralf Jung [Sun, 17 Nov 2019 10:40:18 +0000 (11:40 +0100)]
update Miri

4 years agoRename directory `rustc_plugin` -> `rustc_plugin_impl`
Vadim Petrochenkov [Sat, 16 Nov 2019 21:54:24 +0000 (00:54 +0300)]
Rename directory `rustc_plugin` -> `rustc_plugin_impl`

4 years agorustc_plugin: Remove the compatibility shim
Vadim Petrochenkov [Sat, 16 Nov 2019 20:35:27 +0000 (23:35 +0300)]
rustc_plugin: Remove the compatibility shim

4 years agoAuto merge of #66336 - ehuss:update-cargo-books, r=Mark-Simulacrum
bors [Sun, 17 Nov 2019 07:45:00 +0000 (07:45 +0000)]
Auto merge of #66336 - ehuss:update-cargo-books, r=Mark-Simulacrum

Update Cargo, books

## cargo

12 commits in 5da4b4d47963868d9878480197581ccbbdaece74..8280633db680dec5bfe1de25156d1a1d53e6d190
2019-10-28 21:53:41 +0000 to 2019-11-11 23:17:05 +0000
- Don't panic when parsing `/proc/stat` (rust-lang/cargo#7580)
- Fix unused configuration key warning for a few keys under `build`. (rust-lang/cargo#7575)
- Add back support for `BROWSER` envvar in `cargo doc --open`. (rust-lang/cargo#7576)
- Only include "already existing ..." comment in gitignore on conflict (rust-lang/cargo#7570)
- Add VS Code user dir to .gitignore (rust-lang/cargo#7578)
- Added aliases to subcommand typo suggestions. (rust-lang/cargo#7486)
- Use multiple requirement syntax consistently (rust-lang/cargo#7573)
- Update verison to 0.42 (rust-lang/cargo#7568)
- Expand documentation on build scripts. (rust-lang/cargo#7565)
- Update crossbeam-utils requirement from 0.6 to 0.7 (rust-lang/cargo#7566)
- don't download std-docs on CI (rust-lang/cargo#7513)
- Change my-buddy to github-handle (rust-lang/cargo#7553)

## nomicon

2 commits in 5004ad30d69f93553ceef74439fea2159d1f769e..58e36e0e08dec5a379ac568827c058e25990d6cd
2019-10-12 19:52:40 +0200 to 2019-10-30 08:14:24 -0500
- remove references to the nursery
- Add github action to replace Travis.yml (rust-lang-nursery/nomicon#172)

## reference

7 commits in 4b21b646669e0af49fae7cae301898dc4bfaa1f0..45558c464fb458affbcdcb34323946da45c8a117
2019-10-27 22:33:11 +0100 to 2019-11-08 14:47:35 +0100
- Audit code blocks. (rust-lang-nursery/reference#715)
- Update coherence and orphan rules documentation to match RFC 2451 (rust-lang-nursery/reference#703)
- Update organization name (rust-lang-nursery/reference#713)
- State that no_implicit_prelude also applies to nested modules (rust-lang-nursery/reference#707)
- expand Copy docs (rust-lang-nursery/reference#711)
- github action doesn't use the nursery (rust-lang-nursery/reference#706)
- Migrate to GitHub Actions. (rust-lang-nursery/reference#705)

## book

1 commits in 28fa3d15b0bc67ea5e79eeff2198e4277fc61baf..e79dd62aa63396714278d484d91d48826737f47f
2019-10-29 07:16:09 -0500 to 2019-10-30 07:33:12 -0500
- No need for an iterator here to fetch values (rust-lang/book#1957)

## rust-by-example

1 commits in f3197ddf2abab9abdbc029def8164f4a748b0d91..dcee312c66267eb5a2f6f1561354003950e29105
2019-10-29 10:17:40 -0300 to 2019-10-31 11:26:53 -0300
- refactor: simplify extracting Result from Option (rust-lang/rust-by-example#1283)

## edition-guide

2 commits in e58bc4ca104e890ac56af846877c874c432a64b5..f553fb26c60c4623ea88a1cfe731eafe0643ce34
2019-07-31 20:14:12 +0200 to 2019-10-30 08:27:42 -0500
- remove old references to the nursery
- Port from Travis to GitHub Actions (rust-lang-nursery/edition-guide#192)