Commit Graph

383 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 55f76cdb2f syntax: use distinct FloatTy from rustc_target.
We also sever syntax's dependency on rustc_target as a result.
This should slightly improve pipe-lining.

Moreover, some cleanup is done in related code.
2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad 167b8fedd6
Rollup merge of #66086 - RalfJung:smallvec, r=nagisa
bump smallvec to 1.0

This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec.

See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement.

Cc @mbrubeck @emilio
2019-11-06 07:03:08 +01:00
Ralf Jung 90b8d34c9f bump smallvec to 1.0 2019-11-04 15:59:09 +01:00
Ralf Jung 9138d3bb80 when Miri tests are not passing, do not add Miri component 2019-11-03 11:47:07 +01:00
bors 253fc0ed74 Auto merge of #65698 - msizanoen1:dual-proc-macro-hash, r=petrochenkov
Dual proc macro hash

This PR changes current `-Z dual-proc-macro` mechanism from resolving only by name to including the hash of the host crate inside the transistive dependency information to prevent name conflicts.
Fix partially #62558
2019-11-01 06:35:40 +00:00
Ralf Jung 9cd1edea4a rebase and re-update lock file 2019-10-31 07:50:54 +01:00
Ralf Jung 64cf596ca6 update miri 2019-10-31 07:50:27 +01:00
msizanoen1 8a0d2332f9 Adjust rustc-workspace-hack 2019-10-31 13:12:35 +07:00
Igor Matuszewski 0658b24925 submodules: Bump RLS to 58869107ec162a821a4bee53cdd3f51c84cda3ea
Most importantly it contains d267b49c2f
which fixes the RLS build whenever Clippy is built successfully in Rust CI.
2019-10-30 16:05:38 +01:00
Tyler Mandry 4359666daa
Rollup merge of #65920 - smaeul:patch/workspace-hack, r=alexcrichton
Use rustc-workspace-hack for rustbook

As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
2019-10-29 12:01:46 -07:00
Tyler Mandry 67558a890e
Rollup merge of #65906 - integer32llc:update-mdbook, r=alexcrichton
Update mdbook to 0.3.3

There are some new features of mdbook that I'd like to use in TRPL.
2019-10-29 12:01:44 -07:00
Samuel Holland c648ad587c Use rustc-workspace-hack for rustbook
As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
2019-10-28 22:34:43 -05:00
Mazdak Farrokhzad ffc6225cd2
Rollup merge of #65531 - tmandry:bump-backtrace, r=cramertj
Update backtrace to 0.3.40

Diff: https://github.com/rust-lang/backtrace-rs/compare/0.3.37...b5cc5b12fa4fd03cb83546a7c62b9fff40086b63

Pretty low risk, considering the only changes are in low-tier targets.

r? @cramertj
cc @alexcrichton
2019-10-29 04:08:20 +01:00
Mazdak Farrokhzad 42d4e261a1
Rollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasper
Lint ignored `#[inline]` on function prototypes

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

- Adds a `unused_attribute` lint for `#[inline]` on function prototypes.
- As a consequence, foreign items, impl items and trait items now have their attributes checked, which could cause some code to no longer compile (it was previously erroneously ignored).
2019-10-29 04:08:18 +01:00
Tyler Mandry d7f99dadd4 Update backtrace to 0.3.40 2019-10-28 16:27:07 -07:00
Carol (Nichols || Goulding) 3bd16c291e
Update mdbook to 0.3.3 2019-10-28 16:21:53 -04:00
Mazdak Farrokhzad fb12c70852 rustc, rustc_passes: don't depend on syntax_expand.
This is done by moving some data definitions to syntax::expand.
2019-10-27 17:05:57 +01:00
bors fae75cd216 Auto merge of #65167 - hermitcore:rusty-hermit, r=alexcrichton
Redesign the interface to the unikernel HermitCore

We are developing the unikernel HermitCore, where the kernel is written in Rust and is already part of the Rust Standard Library. The interface between the standard library and the kernel based on a small C library. With this pull request, we remove completely the dependency to C and use lld as linker. Currently, the kernel will be linked to the application as static library, which is published at https://github.com/hermitcore/libhermit-rs.

We don’t longer support the C interface to the kernel. Consequently, we remove this part from the Rust Standard Library.
2019-10-26 19:35:59 +00:00
varkor b925eb5f42 Update bitflags 2019-10-25 23:26:27 +01:00
Yuki Okushi 574b0780ab
Rollup merge of #65800 - michaelwoerister:measureme-0.4.0, r=wesleywiser
self-profiling: Update measureme to 0.4.0 and remove non-RAII methods from profiler.

This PR removes all non-RAII based profiling methods from `SelfProfilerRef` 🎉
It also delegates the `TimingGuard` implementation to `measureme`, now that that is available there.

r? @wesleywiser
2019-10-26 02:45:59 +09:00
Stefan Lankes 805a330ab4 rerun cargo to generate lock file 2019-10-25 10:24:14 +02:00
Stefan Lankes 88a7736083 update Cargo.lock 2019-10-25 10:03:41 +02:00
bors 85943fd7c8 Auto merge of #65764 - Manishearth:clippyup, r=Manishearth
Update clippy

Fixes #65754

r? @ghost
2019-10-25 07:47:13 +00:00
Stefan Lankes d349e32fc7 Merge branch 'master' into rusty-hermit, resolve conflicts 2019-10-25 09:09:55 +02:00
Manish Goregaokar 7d0162d7ed Update clippy 2019-10-24 08:15:32 -07:00
Michael Woerister ee1173a8ff self-profiling: Update measureme to 0.4.0 and use new RAII-based API. 2019-10-24 17:14:38 +02:00
Alex Crichton 060b6cbe74 Update hashbrown to 0.6.2
Pulls in rust-lang/hashbrown#119 which should be a good improvement for
compile times of hashmap-heavy crates.
2019-10-24 08:07:03 -07:00
Mazdak Farrokhzad 7c043e284a
Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakis
Lockless LintStore

This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence.

The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes:
 * We no longer implicitly register lints when registering lint passes
    * For the most part this means that registration calls now likely want to call something like:
       `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`.
    * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints.
 * Lint passes still have a list of associated lints, but a followup PR could plausibly change that
   * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before.
 * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected).
 * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-23 22:19:10 +02:00
Lzu Tao 7e0ef6e92e update compiletest 2019-10-23 02:46:10 +00:00
Stefan Lankes ddcd157d03
Merge branch 'master' into rusty-hermit 2019-10-22 19:01:09 +02:00
Mazdak Farrokhzad ed9cc70768
Rollup merge of #65595 - Centril:cfgspecs, r=Mark-Simulacrum
move `parse_cfgspecs` to `rustc_interface`

Part of https://github.com/rust-lang/rust/pull/65324.

r? @Mark-Simulacrum
2019-10-20 12:40:19 +02:00
Stefan Lankes b6801b7dcd
Merge branch 'master' into rusty-hermit 2019-10-20 10:48:58 +02:00
Stefan Lankes 5ebd4d9c27 move interface to the unikernel in the crate hermit-abi
=> simplifies the maintenance of the interface
2019-10-20 10:46:18 +02:00
bors 7bf377f289 Auto merge of #65469 - mati865:libc, r=alexcrichton
Update libc to 0.2.64

Passed local tests.

cc potentially interested people: @gnzlbg @tlively
2019-10-20 06:10:51 +00:00
Mazdak Farrokhzad d945f9860f move parse_cfgspecs to rustc_interface 2019-10-19 13:25:46 +02:00
Mark Rousskov dab3bd6cda Create lint store during plugin registration
Remove lint store from Session
2019-10-17 19:41:21 -04:00
Mateusz Mikuła 01008e4cd6 Update libc to 0.2.64 2019-10-16 12:50:59 +02:00
Mazdak Farrokhzad d420d719c4 move syntax::ext to new crate syntax_expand 2019-10-16 10:59:53 +02:00
Ralf Jung 4977e319a4 update miri 2019-10-14 17:59:45 +02:00
Lzu Tao 81d813dd67 Bump home crate 2019-10-12 08:29:27 +00:00
Igor Matuszewski ae79ea3422 Update RLS and Rustfmt
This also bumps rustc-ap-* crates and fixes the relevant toolstate.
2019-10-12 08:28:12 +00:00
Mazdak Farrokhzad 27240fe77b
Rollup merge of #64656 - passcod:map-entry-insert, r=Amanieu
Implement (HashMap) Entry::insert as per #60142

Implementation of `Entry::insert` as per @SimonSapin's comment on #60142. This requires a patch to hashbrown:

```diff
diff --git a/src/rustc_entry.rs b/src/rustc_entry.rs
index fefa5c3..7de8300 100644
--- a/src/rustc_entry.rs
+++ b/src/rustc_entry.rs
@@ -546,6 +546,32 @@ impl<'a, K, V> RustcVacantEntry<'a, K, V> {
         let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
         unsafe { &mut bucket.as_mut().1 }
     }
+
+    /// Sets the value of the entry with the RustcVacantEntry's key,
+    /// and returns a RustcOccupiedEntry.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use hashbrown::HashMap;
+    /// use hashbrown::hash_map::RustcEntry;
+    ///
+    /// let mut map: HashMap<&str, u32> = HashMap::new();
+    ///
+    /// if let RustcEntry::Vacant(v) = map.rustc_entry("poneyland") {
+    ///     let o = v.insert_and_return(37);
+    ///     assert_eq!(o.get(), &37);
+    /// }
+    /// ```
+     #[inline]
+    pub fn insert_and_return(self, value: V) -> RustcOccupiedEntry<'a, K, V> {
+        let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
+        RustcOccupiedEntry {
+            key: None,
+            elem: bucket,
+            table: self.table
+        }
+    }
 }

 impl<K, V> IterMut<'_, K, V> {
```

This is also only an implementation for HashMap. I tried implementing for BTreeMap, but I don't really understand BTreeMap's internals and require more guidance on implementing the equivalent `VacantEntry::insert_and_return` such that it returns an `OccupiedEntry`. Notably, following the original PR's modifications I end up needing a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::LeafOrInternal>, _>` while I only have a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::Internal>, _>` and don't know how to proceed.

(To be clear, I'm not asking for guidance right now; I'd be happy getting only the HashMap implementation — the subject of this PR — reviewed and ready, and leave the BTreeMap implementation for a latter PR.)
2019-10-09 05:31:33 +02:00
Félix Saparelli bdcc21cbc4 Implement (HashMap) Entry::insert as per #60142 2019-10-09 11:00:29 +13:00
Josh Stone 29cd7eb6c9 Update other rayon uses to 1.2 too 2019-10-07 13:44:30 -07:00
Josh Stone 33c4125fbe Rebase rustc-rayon on rayon-1.2
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-07 13:20:17 -07:00
Tyler Mandry c457b6fcbf
Rollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis
Upgrade librustc_macros dependencies

Passed tests on Linux.
2019-10-06 11:41:56 -07:00
Mark Rousskov 7c3f65b3c4 middle::intrinsicck -> rustc_passes 2019-10-04 11:11:33 -04:00
Mateusz Mikuła d89608829c Upgrade librustc_macros dependencies 2019-10-04 14:43:23 +02:00
Alex Crichton 4447388f17 Update `Cargo.lock` for cargo update 2019-10-01 15:02:45 -07:00
bors 22bc9e1d9c Auto merge of #64778 - csmoe:index, r=eddyb
Introduce librustc_index crate

Closes #50592
2019-09-30 13:33:15 +00:00