]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoDon't try to print missing HIR ids
John Kåre Alsaker [Thu, 20 Feb 2020 18:24:44 +0000 (19:24 +0100)]
Don't try to print missing HIR ids

4 years agoUpdate tests
John Kåre Alsaker [Thu, 13 Feb 2020 10:17:49 +0000 (11:17 +0100)]
Update tests

4 years agoUpdate ich_nested_items.rs
John Kåre Alsaker [Wed, 12 Feb 2020 17:50:30 +0000 (18:50 +0100)]
Update ich_nested_items.rs

4 years agoReintroduce workaround for #62649
John Kåre Alsaker [Wed, 12 Feb 2020 17:11:32 +0000 (18:11 +0100)]
Reintroduce workaround for #62649

4 years agoFormat function_interfaces.rs
John Kåre Alsaker [Wed, 12 Feb 2020 15:01:24 +0000 (16:01 +0100)]
Format function_interfaces.rs

4 years agoReplace `Hir` with `hir_owner` in tests
John Kåre Alsaker [Wed, 12 Feb 2020 15:00:15 +0000 (16:00 +0100)]
Replace `Hir` with `hir_owner` in tests

4 years agoReplace `HirBody` with `hir_owner_items` in tests
John Kåre Alsaker [Wed, 12 Feb 2020 14:34:10 +0000 (15:34 +0100)]
Replace `HirBody` with `hir_owner_items` in tests

4 years agoCreate the `hir_to_node_id` map before `TyCtxt`
John Kåre Alsaker [Wed, 12 Feb 2020 14:11:33 +0000 (15:11 +0100)]
Create the `hir_to_node_id` map before `TyCtxt`

4 years agoOptimize the HIR map
John Kåre Alsaker [Mon, 10 Feb 2020 16:00:49 +0000 (17:00 +0100)]
Optimize the HIR map

4 years agoDon't hash HIR with bodies thrice
John Kåre Alsaker [Mon, 10 Feb 2020 13:29:21 +0000 (14:29 +0100)]
Don't hash HIR with bodies thrice

4 years agoFix HIR map validation
John Kåre Alsaker [Sun, 9 Feb 2020 16:11:02 +0000 (17:11 +0100)]
Fix HIR map validation

4 years agoIndex HIR after creating TyCtxt
John Kåre Alsaker [Sun, 9 Feb 2020 14:32:00 +0000 (15:32 +0100)]
Index HIR after creating TyCtxt

4 years agoOnly hash the Hir owner (including its bodies)
John Kåre Alsaker [Sun, 9 Feb 2020 11:13:08 +0000 (12:13 +0100)]
Only hash the Hir owner (including its bodies)

4 years agoRemove `input_task`
John Kåre Alsaker [Sun, 9 Feb 2020 09:31:13 +0000 (10:31 +0100)]
Remove `input_task`

4 years agoRemove `Hir` and `HirBody` dep nodes
John Kåre Alsaker [Sat, 8 Feb 2020 04:30:45 +0000 (05:30 +0100)]
Remove `Hir` and `HirBody` dep nodes

4 years agoClean up the collector
John Kåre Alsaker [Sat, 8 Feb 2020 04:18:34 +0000 (05:18 +0100)]
Clean up the collector

4 years agoRemove `AllLocalTraitImpls`
John Kåre Alsaker [Sat, 8 Feb 2020 03:26:12 +0000 (04:26 +0100)]
Remove `AllLocalTraitImpls`

4 years agoRemove the `map` field from `Map`
John Kåre Alsaker [Sat, 8 Feb 2020 03:24:42 +0000 (04:24 +0100)]
Remove the `map` field from `Map`

4 years agoUpdate `trait_impls`
John Kåre Alsaker [Sat, 8 Feb 2020 03:14:29 +0000 (04:14 +0100)]
Update `trait_impls`

4 years agoRemove comments
John Kåre Alsaker [Sat, 8 Feb 2020 02:30:57 +0000 (03:30 +0100)]
Remove comments

4 years agoUpdate `find_entry`
John Kåre Alsaker [Fri, 7 Feb 2020 18:17:48 +0000 (19:17 +0100)]
Update `find_entry`

4 years agoUpdate `is_hir_id_module`
John Kåre Alsaker [Fri, 7 Feb 2020 18:09:19 +0000 (19:09 +0100)]
Update `is_hir_id_module`

4 years agoUpdate `find`
John Kåre Alsaker [Fri, 7 Feb 2020 18:01:27 +0000 (19:01 +0100)]
Update `find`

4 years agoUpdate `get_parent_node`
John Kåre Alsaker [Fri, 7 Feb 2020 17:46:21 +0000 (18:46 +0100)]
Update `get_parent_node`

4 years agoUpdate `visit_item_likes_in_module`
John Kåre Alsaker [Fri, 7 Feb 2020 17:25:36 +0000 (18:25 +0100)]
Update `visit_item_likes_in_module`

4 years agoUpdate `krate_attrs` and `get_module`
John Kåre Alsaker [Fri, 7 Feb 2020 15:43:36 +0000 (16:43 +0100)]
Update `krate_attrs` and `get_module`

4 years agoUpdate `body_owner` and `maybe_body_owned_by`
John Kåre Alsaker [Fri, 7 Feb 2020 15:10:50 +0000 (16:10 +0100)]
Update `body_owner` and `maybe_body_owned_by`

4 years agoUpdate `fn_decl_by_hir_id` and `fn_sig_by_hir_id`
John Kåre Alsaker [Fri, 7 Feb 2020 14:34:39 +0000 (15:34 +0100)]
Update `fn_decl_by_hir_id` and `fn_sig_by_hir_id`

4 years agoUpdate item functions
John Kåre Alsaker [Fri, 7 Feb 2020 14:17:05 +0000 (15:17 +0100)]
Update item functions

4 years agoCreate Map after TyCtxt
John Kåre Alsaker [Fri, 7 Feb 2020 12:13:35 +0000 (13:13 +0100)]
Create Map after TyCtxt

4 years agoCollect the new maps
John Kåre Alsaker [Fri, 7 Feb 2020 10:45:04 +0000 (11:45 +0100)]
Collect the new maps

4 years agoAdd HIR queries
John Kåre Alsaker [Fri, 7 Feb 2020 10:14:47 +0000 (11:14 +0100)]
Add HIR queries

4 years agoAuto merge of #69076 - cjgillot:split_trait, r=matthewjasper
bors [Sat, 14 Mar 2020 16:43:20 +0000 (16:43 +0000)]
Auto merge of #69076 - cjgillot:split_trait, r=matthewjasper

Split librustc::{traits,infer} to their respective crates

Followup on #67953.

I tried to follow the existing module structures.

cc @eddyb
r? @Zoxc

4 years agoAuto merge of #69923 - matthiaskrgr:submodule_upd, r=Dylan-DPC
bors [Sat, 14 Mar 2020 13:28:50 +0000 (13:28 +0000)]
Auto merge of #69923 - matthiaskrgr:submodule_upd, r=Dylan-DPC

submodules: update clippy from 329923ed to fdce47ba

Changes:
````
add CR feedback
Improve documentation
Use `edition:2018` flag more widely
Update tests/ui/needless_doc_main.rs
Move links to the end of each chapter on adding_lints
Move links to the end of each chapter on CONTRIBUTING
Clean-up adding_lints.md
Clean-up CONTRIBUTING.md
needless_doc_main: only check rust code
Use `node_type_opt` over `node_type`
Fix doc
Fix ICE with trivial_bounds feature
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy.
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
Improve placeholder in map_unit_fn
Fix match single binding when in a let stmt
Improve error messages for {option,result}_map_unit_fn
Mention the setup instructions in CONTRIBUTING
redundant_pattern: take binding (ref, ref mut) into account in suggestion.
check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed
deps: bump itertools 0.8 -> 0.9
add lint on File::read_to_string and File::read_to_end
transition rustc-guide to rustc-dev-guide
Rename macro_use_import -> macro_use_imports
warn on macro_use attr
Fix deploy script for tag deploys
````

Fixes rust-lang#69957

4 years agoTrim dependencies and features.
Camille GILLOT [Tue, 11 Feb 2020 21:39:02 +0000 (22:39 +0100)]
Trim dependencies and features.

4 years agoMake downstream crates compile.
Camille GILLOT [Tue, 11 Feb 2020 20:19:40 +0000 (21:19 +0100)]
Make downstream crates compile.

4 years agoSplit librustc_infer.
Camille GILLOT [Sat, 22 Feb 2020 10:44:18 +0000 (11:44 +0100)]
Split librustc_infer.

4 years agoMove rustc_infer::traits to new crate rustc_trait_selection.
Camille GILLOT [Tue, 11 Feb 2020 18:53:40 +0000 (19:53 +0100)]
Move rustc_infer::traits to new crate rustc_trait_selection.

4 years agoMode ProjectionCache to its own module.
Camille GILLOT [Tue, 11 Feb 2020 18:46:31 +0000 (19:46 +0100)]
Mode ProjectionCache to its own module.

4 years agoMove traits::query::outlives_bounds::explicit_outlives_bounds to infer::outlives.
Camille GILLOT [Mon, 10 Feb 2020 19:39:11 +0000 (20:39 +0100)]
Move traits::query::outlives_bounds::explicit_outlives_bounds to infer::outlives.

4 years agoMove opaque_types::unexpected_hidden_region_diagnostic to error_reporting.
Camille GILLOT [Mon, 10 Feb 2020 19:26:24 +0000 (20:26 +0100)]
Move opaque_types::unexpected_hidden_region_diagnostic to error_reporting.

4 years agoMove IntercrateAmbiguityCause back to rustc::traits::select.
Camille GILLOT [Mon, 10 Feb 2020 19:50:16 +0000 (20:50 +0100)]
Move IntercrateAmbiguityCause back to rustc::traits::select.

4 years agoAuto merge of #69744 - ecstatic-morse:fix-enum-discr-effect-test, r=oli-obk
bors [Sat, 14 Mar 2020 08:26:54 +0000 (08:26 +0000)]
Auto merge of #69744 - ecstatic-morse:fix-enum-discr-effect-test, r=oli-obk

Add `mir-opt` test for more precise drop elaboration

Depends on #69676. This test should ensure that the problem fixed in that PR does not reoccur.

This has been split out from #69676 since the test fails on certain targets where no cleanup blocks are emitted. I have to find the correct `ignore` directives.

r? @oli-obk

4 years agoAuto merge of #69716 - jonas-schievink:generator-size, r=tmandry
bors [Sat, 14 Mar 2020 02:04:49 +0000 (02:04 +0000)]
Auto merge of #69716 - jonas-schievink:generator-size, r=tmandry

Don't store locals in generators that are immediately overwritten with the resume argument

This fixes https://github.com/rust-lang/rust/issues/69672 and makes https://github.com/rust-lang/rust/pull/69033 pass the async fn size tests again (in other words, there will be no size regression of async fn if both this and https://github.com/rust-lang/rust/pull/69033 land).

~~This is a small botch and I'd rather have a more precise analysis, but that seems much harder to pull off, so this special-cases `Yield` terminators that store the resume argument into a simple local (ie. without any field projections) and explicitly marks that local as "not live" in the suspend point of that yield. We know that this local does not need to be stored in the generator for this suspend point because the next resume would immediately overwrite it with the passed-in resume argument anyways. The local might still end up in the state if it is used across another yield.~~ (this now properly updates the dataflow framework to handle this case)

4 years agoAuto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrum
bors [Fri, 13 Mar 2020 22:43:06 +0000 (22:43 +0000)]
Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrum

Optimize catch_unwind to match C++ try/catch

This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown.

https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great.

This PR, on the other hand, generates the following assembly:

```asm
# -Cpanic=unwind:
push   rbx
mov    ebx,0x2a
call   QWORD PTR [rip+0x1c53c]        # <happy>
mov    eax,ebx
pop    rbx
ret
mov    rdi,rax
call   QWORD PTR [rip+0x1c537]        # cleanup function call
call   QWORD PTR [rip+0x1c539]        # <unfortunate>
mov    ebx,0xd
mov    eax,ebx
pop    rbx
ret

# -Cpanic=abort:
push   rax
call   QWORD PTR [rip+0x20a1]        # <happy>
mov    eax,0x2a
pop    rcx
ret
```

Fixes #64224, and resolves #64222.

4 years agoAuto merge of #69986 - JohnTitor:rollup-h0809mf, r=JohnTitor
bors [Fri, 13 Mar 2020 19:16:03 +0000 (19:16 +0000)]
Auto merge of #69986 - JohnTitor:rollup-h0809mf, r=JohnTitor

Rollup of 12 pull requests

Successful merges:

 - #69403 (Implement `Copy` for `IoSlice`)
 - #69460 (Move some `build-pass` tests to `check-pass`)
 - #69723 (Added doc on keyword Pub.)
 - #69802 (fix more clippy findings)
 - #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes))
 - #69947 (Clean up E0423 explanation)
 - #69949 (triagebot.toml: add ping aliases)
 - #69954 (rename panic_if_ intrinsics to assert_)
 - #69960 (miri engine: fix treatment of abort intrinsic)
 - #69966 (Add more regression tests)
 - #69973 (Update stable-since version for const_int_conversion)
 - #69974 (Clean up E0434 explanation)

Failed merges:

r? @ghost

4 years agoRollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC
Yuki Okushi [Fri, 13 Mar 2020 19:03:37 +0000 (04:03 +0900)]
Rollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC

Clean up E0434 explanation

r? @Dylan-DPC

4 years agoRollup merge of #69973 - tspiteri:const-int-conversion-since, r=dtolnay
Yuki Okushi [Fri, 13 Mar 2020 19:03:36 +0000 (04:03 +0900)]
Rollup merge of #69973 - tspiteri:const-int-conversion-since, r=dtolnay

Update stable-since version for const_int_conversion

Since #69373 was not merged in time for 1.43.0 beta, update to `since = "1.44.0"`.

4 years agoRollup merge of #69966 - JohnTitor:more-more-tests, r=Centril
Yuki Okushi [Fri, 13 Mar 2020 19:03:34 +0000 (04:03 +0900)]
Rollup merge of #69966 - JohnTitor:more-more-tests, r=Centril

Add more regression tests

Closes #58490, closes #60390, closes #62504, closes #67739, closes #69092

r? @Centril

4 years agoRollup merge of #69960 - RalfJung:abort, r=oli-obk
Yuki Okushi [Fri, 13 Mar 2020 19:03:33 +0000 (04:03 +0900)]
Rollup merge of #69960 - RalfJung:abort, r=oli-obk

miri engine: fix treatment of abort intrinsic

I screwed up in https://github.com/rust-lang/rust/pull/69830 and added `abort` to the wrong block of intrinsics, namely the one that actually has a return place. So that branch was never actually reached.

r? @oli-obk

4 years agoRollup merge of #69954 - RalfJung:panic_if-assert, r=Centril,eddyb
Yuki Okushi [Fri, 13 Mar 2020 19:03:31 +0000 (04:03 +0900)]
Rollup merge of #69954 - RalfJung:panic_if-assert, r=Centril,eddyb

rename panic_if_ intrinsics to assert_

[Suggested by @eddyb](https://github.com/rust-lang/miri/issues/1222#issuecomment-598087523)

4 years agoRollup merge of #69949 - rust-lang:triagebot-ping-alias, r=Mark-Simulacrum
Yuki Okushi [Fri, 13 Mar 2020 19:03:29 +0000 (04:03 +0900)]
Rollup merge of #69949 - rust-lang:triagebot-ping-alias, r=Mark-Simulacrum

triagebot.toml: add ping aliases

I think I got the syntax right.
Closes https://github.com/rust-lang/triagebot/issues/402.

r? @Mark-Simulacrum
cc @pnkfelix

4 years agoRollup merge of #69947 - GuillaumeGomez:cleanup-e0423, r=Dylan-DPC
Yuki Okushi [Fri, 13 Mar 2020 19:03:28 +0000 (04:03 +0900)]
Rollup merge of #69947 - GuillaumeGomez:cleanup-e0423, r=Dylan-DPC

Clean up E0423 explanation

r? @Dylan-DPC

4 years agoRollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb
Yuki Okushi [Fri, 13 Mar 2020 19:03:26 +0000 (04:03 +0900)]
Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb

remove lifetimes that can be elided (clippy::needless_lifetimes)

4 years agoRollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPC
Yuki Okushi [Fri, 13 Mar 2020 19:03:24 +0000 (04:03 +0900)]
Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPC

fix more clippy findings

* reduce references on match patterns (clippy::match_ref_pats)
* Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline)
* libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string)
* remove unneeded mutable references (cippy::unnecessary_mut_passed)
* libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast)
* rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes)
* call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref)
* iterate over a maps values directly. (clippy::for_kv_map)
* rustdoc: simplify boolean condition (clippy::nonminimal_bool)
* Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently)
* rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some)
* rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)

4 years agoRollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum
Yuki Okushi [Fri, 13 Mar 2020 19:03:23 +0000 (04:03 +0900)]
Rollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum

Added doc on keyword Pub.

Hi, this is my first pull request. I hope it's OK. Please let me know if it would benefit from any changes. Thank you.

4 years agoRollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung
Yuki Okushi [Fri, 13 Mar 2020 19:03:22 +0000 (04:03 +0900)]
Rollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung

Move some `build-pass` tests to `check-pass`

Helps with #62277.

r? @cramertj cc @Centril

4 years agoRollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfackler
Yuki Okushi [Fri, 13 Mar 2020 19:03:20 +0000 (04:03 +0900)]
Rollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfackler

Implement `Copy` for `IoSlice`

Resolves #69395

r? @sfackler

4 years agoAuto merge of #69155 - chrissimpkins:llvm-globals, r=eddyb
bors [Fri, 13 Mar 2020 16:10:20 +0000 (16:10 +0000)]
Auto merge of #69155 - chrissimpkins:llvm-globals, r=eddyb

Add support for LLVM globals corresponding to miri allocations should be named alloc123

Adds support for this request from @eddyb in #69134:

> That is, if -Zfewer-names is false (usually only because of --emit=llvm-ir), we should use the same name for LLVM globals we generate out of miri allocs as #67133 does in MIR output (allocN).
>
>This way, we can easily see the mapping between MIR and LLVM IR (and it shouldn't be any costlier for regular compilation, which would continue to use unnamed globals).

r? @eddyb
cc @oli-obk

4 years agoAdd documentation for pub keyword
sjud [Thu, 5 Mar 2020 00:14:27 +0000 (19:14 -0500)]
Add documentation for pub keyword

4 years agoClean up E0434 explanation
Guillaume Gomez [Fri, 13 Mar 2020 13:36:14 +0000 (14:36 +0100)]
Clean up E0434 explanation

4 years agoupdate stable-since version for const_int_conversion
Trevor Spiteri [Fri, 13 Mar 2020 13:25:35 +0000 (14:25 +0100)]
update stable-since version for const_int_conversion

4 years agobless tests
Ralf Jung [Fri, 13 Mar 2020 07:52:04 +0000 (08:52 +0100)]
bless tests

4 years agoadjust enum naming
Ralf Jung [Fri, 13 Mar 2020 07:43:27 +0000 (08:43 +0100)]
adjust enum naming

4 years agoAdd test for issue-69092
Yuki Okushi [Fri, 13 Mar 2020 00:04:27 +0000 (09:04 +0900)]
Add test for issue-69092

4 years agoAdd test for issue-67739
Yuki Okushi [Fri, 13 Mar 2020 00:04:14 +0000 (09:04 +0900)]
Add test for issue-67739

4 years agoAdd test for issue-62504
Yuki Okushi [Fri, 13 Mar 2020 00:03:58 +0000 (09:03 +0900)]
Add test for issue-62504

4 years agoAdd test for issue-60390
Yuki Okushi [Fri, 13 Mar 2020 00:03:44 +0000 (09:03 +0900)]
Add test for issue-60390

4 years agoAdd test for issue-58490
Yuki Okushi [Fri, 13 Mar 2020 00:03:30 +0000 (09:03 +0900)]
Add test for issue-58490

4 years agosubmodules: update clippy from 329923ed to 8485d40a
Matthias Krüger [Thu, 12 Mar 2020 20:47:47 +0000 (21:47 +0100)]
submodules: update clippy from 329923ed to 8485d40a

Changes:
````
Rustup to rust-lang/rust#69674
Use visit_place
Check for mutation
Only fires on temporaries
Extend `redundant_clone` to the case that cloned value is not consumed
add CR feedback
Improve documentation
Use `edition:2018` flag more widely
Update tests/ui/needless_doc_main.rs
Move links to the end of each chapter on adding_lints
Move links to the end of each chapter on CONTRIBUTING
Clean-up adding_lints.md
Clean-up CONTRIBUTING.md
needless_doc_main: only check rust code
Use `node_type_opt` over `node_type`
Fix doc
Fix ICE with trivial_bounds feature
clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy.
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
Improve placeholder in map_unit_fn
Fix match single binding when in a let stmt
Improve error messages for {option,result}_map_unit_fn
Mention the setup instructions in CONTRIBUTING
redundant_pattern: take binding (ref, ref mut) into account in suggestion.
check_pat: delay creation of the "normal" vec until we reach the branch where is is actually needed
deps: bump itertools 0.8 -> 0.9
add lint on File::read_to_string and File::read_to_end
transition rustc-guide to rustc-dev-guide
Rename macro_use_import -> macro_use_imports
warn on macro_use attr
Fix deploy script for tag deploys
````

Fixes #69957

4 years agomiri engine: fix treatment of abort intrinsic
Ralf Jung [Thu, 12 Mar 2020 20:22:22 +0000 (21:22 +0100)]
miri engine: fix treatment of abort intrinsic

4 years agoremove lifetimes that can be elided (clippy::needless_lifetimes)
Matthias Krüger [Fri, 6 Mar 2020 23:56:32 +0000 (00:56 +0100)]
remove lifetimes that can be elided (clippy::needless_lifetimes)

4 years agorename panic_if_ intrinsics to assert_
Ralf Jung [Thu, 12 Mar 2020 18:38:09 +0000 (19:38 +0100)]
rename panic_if_ intrinsics to assert_

4 years agotriagebot.toml: add typo aliases
Mazdak Farrokhzad [Thu, 12 Mar 2020 17:06:40 +0000 (18:06 +0100)]
triagebot.toml: add typo aliases

4 years agoMove some more tests to `check-pass`
LeSeulArtichaut [Thu, 12 Mar 2020 16:22:44 +0000 (17:22 +0100)]
Move some more tests to `check-pass`

4 years agoAuto merge of #69950 - Centril:rollup-xh0hmvx, r=Centril
bors [Thu, 12 Mar 2020 16:20:52 +0000 (16:20 +0000)]
Auto merge of #69950 - Centril:rollup-xh0hmvx, r=Centril

Rollup of 10 pull requests

Successful merges:

 - #68899 (Add Display and Error impls for proc_macro::LexError)
 - #69011 (Document unsafe blocks in core::fmt)
 - #69674 (Rename DefKind::Method and TraitItemKind::Method )
 - #69705 (Toolstate: remove redundant beta-week check.)
 - #69722 (Tweak output for invalid negative impl AST errors)
 - #69747 (Rename rustc guide)
 - #69792 (Implement Error for TryReserveError)
 - #69830 (miri: ICE on invalid terminators)
 - #69921 (rustdoc: remove unused import)
 - #69945 (update outdated comment)

Failed merges:

r? @ghost

4 years agoMove some const-eval `build-pass` tests to `check-pass`
LeSeulArtichaut [Thu, 12 Mar 2020 15:58:34 +0000 (16:58 +0100)]
Move some const-eval `build-pass` tests to `check-pass`

4 years agoRollup merge of #69945 - contrun:fix-outdated-comment, r=petrochenkov
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:27 +0000 (16:32 +0100)]
Rollup merge of #69945 - contrun:fix-outdated-comment, r=petrochenkov

update outdated comment

4 years agoRollup merge of #69921 - matthiaskrgr:rustdoc_import, r=Centril
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:25 +0000 (16:32 +0100)]
Rollup merge of #69921 - matthiaskrgr:rustdoc_import, r=Centril

rustdoc: remove unused import

```
    Checking rustdoc v0.0.0 (/home/matthias/vcs/github/rust/src/librustdoc)
warning: unused import: `rustc_span::symbol::sym`
  --> src/librustdoc/clean/inline.rs:15:5
   |
15 | use rustc_span::symbol::sym;
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
```

4 years agoRollup merge of #69830 - RalfJung:miri-invalid-terminator, r=oli-obk
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:23 +0000 (16:32 +0100)]
Rollup merge of #69830 - RalfJung:miri-invalid-terminator, r=oli-obk

miri: ICE on invalid terminators

We've run a lot of MIR in Miri (including some generators) and never seen these.

@tmandry is it correct that `Yield` and `GeneratorDrop` get lowered away?

@eddyb @oli-obk what's with this `Abort` that does not seem to ever actually exist? Codegen *does* seem to handle it, so I wonder why Miri can get away without that. In fact, codegen handles it twice:

https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/block.rs#L796

https://github.com/rust-lang/rust/blob/1d5241c96208ca7d925442b1a5fa45ad18717a6f/src/librustc_codegen_ssa/mir/mod.rs#L296

4 years agoRollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:21 +0000 (16:32 +0100)]
Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfackler

Implement Error for TryReserveError

I noticed that the Error trait wasn't implemented for TryReserveError. (#48043)

Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std.

4 years agoRollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbini
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:19 +0000 (16:32 +0100)]
Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbini

Rename rustc guide

This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470
Needs to be merged after we actually rename the guide.

Have used this to rename:

`git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'`
`git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'`
`git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`

4 years agoRollup merge of #69722 - estebank:negative-impl-span-ast, r=Centril
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:17 +0000 (16:32 +0100)]
Rollup merge of #69722 - estebank:negative-impl-span-ast, r=Centril

Tweak output for invalid negative impl AST errors

Use more accurate spans for negative `impl` errors.

r? @Centril

4 years agoRollup merge of #69705 - ehuss:toolstate-remove-redundant-beta, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:15 +0000 (16:32 +0100)]
Rollup merge of #69705 - ehuss:toolstate-remove-redundant-beta, r=Mark-Simulacrum

Toolstate: remove redundant beta-week check.

I made a bit of a mistake in #69624.  The "beta regression" doesn't need to be checked twice.

I also rolled up #69693 to avoid merge conflicts.

4 years agoRollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasper
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:13 +0000 (16:32 +0100)]
Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasper

Rename DefKind::Method and TraitItemKind::Method

r? @eddyb, @Centril, or @matthewjasper

cc #69498 #60163

4 years agoRollup merge of #69011 - foeb:document-unsafe-core-fmt, r=Mark-Simulacrum
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:11 +0000 (16:32 +0100)]
Rollup merge of #69011 - foeb:document-unsafe-core-fmt, r=Mark-Simulacrum

Document unsafe blocks in core::fmt

r? @RalfJung
CC: @rust-lang/wg-unsafe-code-guidelines
#66219

Sorry for the hiatus, but here's a few more files with the unsafe blocks documented! I think working on it smaller chunks like this will be easier for everyone.

4 years agoRollup merge of #68899 - kinseytamsin:lexerror-error-impl, r=Centril
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:32:07 +0000 (16:32 +0100)]
Rollup merge of #68899 - kinseytamsin:lexerror-error-impl, r=Centril

Add Display and Error impls for proc_macro::LexError

This should allow LexError to play much nicer with the `?` operator.

Fixes #68896.

(I'm not sure if I did the stability attributes right, so if I need to change them, please let me know!)

4 years agotriagebot.toml: add ping aliases
Mazdak Farrokhzad [Thu, 12 Mar 2020 15:22:12 +0000 (16:22 +0100)]
triagebot.toml: add ping aliases

4 years agosupport LLVM globals corresponding to miri allocations
Chris Simpkins [Thu, 12 Mar 2020 13:53:49 +0000 (09:53 -0400)]
support LLVM globals corresponding to miri allocations

4 years agoClean up E0423 explanation
Guillaume Gomez [Thu, 12 Mar 2020 12:11:07 +0000 (13:11 +0100)]
Clean up E0423 explanation

4 years agoupdate outdated comment
YI [Thu, 12 Mar 2020 10:43:51 +0000 (18:43 +0800)]
update outdated comment

4 years agoAuto merge of #68551 - Marwes:allocations_mir, r=ecstatic-morse
bors [Thu, 12 Mar 2020 09:16:53 +0000 (09:16 +0000)]
Auto merge of #68551 - Marwes:allocations_mir, r=ecstatic-morse

perf: Reuse a Vec in mir simplification

Just moves the vec out of the outer loop so it is reused every iteration

4 years agoAuto merge of #68191 - simlay:add-tvSO-target, r=nagisa
bors [Thu, 12 Mar 2020 04:01:02 +0000 (04:01 +0000)]
Auto merge of #68191 - simlay:add-tvSO-target, r=nagisa

Added tvOS as targets

This is a first attempt of adding support tvOS as described in #48862. It's got a lot of overlap with [src/librustc_target/spec/apple_ios_base.rs](https://github.com/rust-lang/rust/blob/31dd4f4acbcbdb02b0745d2136399ed664a28050/src/librustc_target/spec/apple_ios_base.rs).

I thought about refactoring `apple_ios_base.rs` to include this as well but that would require each of the ios and tvos targets to be of the something like the form `let base = opts(AppleOS::TV, Arch::Arm64)?;` I also did the same thing for watchOS because from what I can tell, all three targets (iOS, tvOS, and watchOS) have the same logic but have different parameters being sent to `xcrun`. Thoughts?

As far as the `data_layout` and other parameters to `Target`, I did as much research as I could but it really seems that processor in the [iPhone 11 is the same as the apple TV](https://en.wikipedia.org/wiki/Apple-designed_processors) so I didn't change any of those parameters.

I did get this to build and tested that it's actually running the the below logic (because the parameter to `xcrun` is `appletvos` not `tvos`).

I didn't manage to get it to actually compile a file with `fn main(){}` because I don't have the stdlib for `aarch64-apple-tvos` compiled it seems. Is there documentation for this?

Similar to the ending of https://github.com/rust-lang/rust/pull/63467, I'm not sure what to do next.

4 years agoGive LexError more descriptive Display impl
Kinsey Favre [Sat, 8 Feb 2020 16:51:54 +0000 (10:51 -0600)]
Give LexError more descriptive Display impl

4 years agoCorrect stability attribute for new LexError impls
Kinsey Favre [Sat, 8 Feb 2020 15:55:49 +0000 (09:55 -0600)]
Correct stability attribute for new LexError impls

4 years agoReformat match statement to make the check pass
Lena Wildervanck [Wed, 11 Mar 2020 16:55:14 +0000 (17:55 +0100)]
Reformat match statement to make the check pass

4 years agoFormat the match statement
Lena Wildervanck [Wed, 11 Mar 2020 16:30:04 +0000 (17:30 +0100)]
Format the match statement

4 years agoAdd Display and Error impls for proc_macro::LexError
Kinsey Favre [Thu, 6 Feb 2020 18:25:18 +0000 (12:25 -0600)]
Add Display and Error impls for proc_macro::LexError

This should allow LexError to play much nicer with the `?` operator.

4 years agoreview comments
Esteban Küber [Wed, 11 Mar 2020 16:17:55 +0000 (09:17 -0700)]
review comments

4 years agorustdoc: remove unused import
Matthias Krüger [Wed, 11 Mar 2020 13:24:07 +0000 (14:24 +0100)]
rustdoc: remove unused import