51 Commits

Author SHA1 Message Date
varkor
9f1269f23c Rename to then_some and then 2019-12-06 12:24:54 +00:00
varkor
50985b012a Use to_option_with in several places 2019-12-06 12:23:23 +00:00
varkor
e3a8ea4e18 Use to_option in various places 2019-12-06 12:23:23 +00:00
Guillaume Gomez
798e389e57 Update to use new librustc_error_codes library 2019-11-14 13:05:42 +01:00
Eduard-Mihai Burtescu
0da85d6228 rustc_metadata: don't let LLVM confuse rmeta blobs for COFF object files. 2019-11-09 02:06:22 +02:00
Michael Woerister
52eda13031 Fix issue #64153 by checking for .rcgu.o suffix when trying to identify Rust generated object files. 2019-10-22 12:33:35 +02:00
bjorn3
ea60335c28 Add top level provide/provide_extern to cg_ssa and cg_utils 2019-10-13 14:43:58 +02:00
bjorn3
dad8ddbfdd Inline functions from cg_ssa::callee and remove the mod
Fixes #65271
2019-10-13 14:42:59 +02:00
Jon Gjengset
45aca119a6
Stabilize mem::take (mem_take)
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-08 18:04:18 -04:00
Michael Woerister
d94262272b Self-Profiling: Make names of existing events more consistent and use new API. 2019-09-30 13:31:56 +02:00
Alex Crichton
5d531aeaf4 rustc: Convert dependency_formats to a query
This commit converts a field of `Session`, `dependency_formats`, into a
query of `TyCtxt`. This information then also needed to be threaded
through to other remaining portions of the linker, but it's relatively
straightforward. The only change here is that instead of
`HashMap<CrateType, T>` the data structure changed to `Vec<(CrateType,
T)>` to make it easier to deal with in queries.
2019-09-23 12:29:51 -07:00
Santiago Pastorino
e9c41148c0
Convert Place's projection to a boxed slice 2019-09-09 18:16:49 -03:00
Mark Rousskov
41b39fce98 Remove rustc_diagnostic_macros feature 2019-09-05 12:35:18 -04:00
Mark Rousskov
b437240cee Replace diagnostic plugins with macro_rules 2019-09-05 12:35:15 -04:00
bjorn3
d809d6ee89
Derive Debug for CrateInfo 2019-08-10 16:47:27 +02:00
Ilija Tovilo
3a6a29b4ec
Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
Vadim Petrochenkov
676d282dd3 Deny unused_lifetimes through rustbuild 2019-07-28 18:47:02 +03:00
Vadim Petrochenkov
434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
Mazdak Farrokhzad
485a084b45
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints

cc #49509

This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~

~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~

TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) 🤔 cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros

r? @oli-obk
2019-07-05 20:26:51 +02:00
Chris Gregory
b0c199a969 Enable mem_take feature in relevant crates 2019-07-01 20:21:53 -07:00
flip1995
084c829fb8
Enable internal lints in bootstrap 2019-06-24 10:45:20 +02:00
Matthew Jasper
d0311e7154 Deny explicit_outlives_requirements in the compiler 2019-06-22 17:13:19 +01:00
Eduard-Mihai Burtescu
8ee1814062 rustc_codegen_*: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Vadim Petrochenkov
8049e6199b Remove unused #![feature(custom_attribute)]s 2019-06-08 23:55:24 +03:00
Nicholas Nethercote
3fc0936546 Don't generate unnecessary rmeta files. 2019-04-24 09:55:11 +10:00
bjorn3
892c88b32f Move some filename constants to cg_ssa 2019-04-20 13:21:40 +02:00
bors
d6f513ec7d Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkov
Rename files about error codes

fixes #60017

This PR will be failed in tidy.

<details>
<summary>The log is here:</summary>

```
tidy check
tidy error: duplicate error code: 411
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83:             __diagnostic_used!(E0411);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84:             err.code(DiagnosticId::Error("E0411".to_owned()));
tidy error: duplicate error code: 424
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90:             debug!("smart_resolve_path_fragment: E0424, source={:?}", source);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92:             __diagnostic_used!(E0424);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93:             err.code(DiagnosticId::Error("E0424".to_owned()));
some tidy checks failed
```

</details>

I'd like to fix this but I don't know what to do.
I will work on later. Please let me know if you have any solutions.

r? @petrochenkov
2019-04-18 14:52:45 +00:00
Yuki OKUSHI
9ad56e3b94 Rename modules 2019-04-17 18:21:34 +09:00
Mateusz Mikuła
87e4b43d51 Deny internal in stage0 2019-04-17 05:15:00 +02:00
flip1995
d3f0cb9b62
Deny internal lints on non conflicting crates
- libarena
- librustc_allocator
- librustc_borrowck
- librustc_codegen_ssa
- librustc_codegen_utils
- librustc_driver
- librustc_errors
- librustc_incremental
- librustc_metadata
- librustc_passes
- librustc_privacy
- librustc_resolve
- librustc_save_analysis
- librustc_target
- librustc_traits
- libsyntax
- libsyntax_ext
- libsyntax_pos
2019-04-03 18:24:21 +02:00
bjorn3
35705dee7e Use ExactSizeIterator + TrustedLen instead of num_cases arg for switch 2019-03-29 17:23:52 +01:00
Taiki Endo
ab19e5870e Use try blocks in rustc_codegen_ssa 2019-03-14 23:12:56 +09:00
Wesley Wiser
25b8c614f0 Wrap the self-profiler in an Arc<Mutex<>>
This will allow us to send it across threads and measure things like
LLVM time.
2019-03-03 10:07:29 -05:00
Alex Crichton
c196097e58 rustc: Update LLVM, remove dead wasm code
This commit updates the LLVM branch to the rebased version of the
upstream release/8.x branch. This includes a wasm patch which means that
the `rewrite_imports` pass in rustc is no longer needed (yay!) and we
can instead rely on `wasm-import-module`, an attribute we're already
emitting, to take care of all the work.
2019-02-26 07:20:17 -08:00
Mazdak Farrokhzad
1d34f2c228 librustc_codegen_ssa: deny(elided_lifetimes_in_paths) 2019-02-25 08:52:46 +01:00
Scott McMurray
3777b86f9b Stabilize slice_sort_by_cached_key 2019-02-12 22:26:44 -08:00
bors
b244f61b77 Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
Cosmetic improvements to doc comments

This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).

r? @steveklabnik

Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12 19:09:24 +00:00
Alexander Regueiro
c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00:00
Taiki Endo
be71fccf11 librustc_codegen_ssa => 2018 2019-02-09 23:31:47 +09:00
Guillaume Gomez
8b886e07f5 Remove images' url to make it work even without internet connection 2019-02-07 11:06:19 +01:00
Mark Simulacrum
db97c48ad6 Remove quote_*! macros and associated APIs 2019-01-24 07:37:34 -07:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
John Kåre Alsaker
0c4d551146 Fix recursion limits 2018-12-23 10:46:03 +01:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
Eduard-Mihai Burtescu
0b569249c8 [eddyb] rustc_codegen_ssa: rename interfaces to traits. 2018-11-16 15:08:18 +02:00
Denis Merigoux
b9e5cf99a9 Separating the back folder between backend-agnostic and LLVM-specific code 2018-11-16 15:08:18 +02:00
Denis Merigoux
1ebdfbb026 Added some docs + start to &mut self builder methods 2018-11-16 15:08:18 +02:00
Denis Merigoux
015e4441f5 Finished moving backend-agnostic code to rustc_codegen_ssa 2018-11-16 15:08:18 +02:00
Denis Merigoux
c0a428ee70 Great separation of librustc_codegen_llvm: librustc_codegen_ssa compiles 2018-11-16 15:07:24 +02:00
Denis Merigoux
915382f730 Moved DeclareMethods, MiscMethods and StaticMethods 2018-11-16 14:55:47 +02:00