Skip to content

[WIP] Attempting to handle case insensitive case. #64699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 12 additions & 32 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ version = "0.40.0"
dependencies = [
"atty",
"bytesize",
"cargo-platform",
"cargo-test-macro",
"cargo-test-support",
"clap",
Expand All @@ -279,7 +278,7 @@ dependencies = [
"crypto-hash",
"curl",
"curl-sys",
"env_logger 0.7.0",
"env_logger",
"failure",
"filetime",
"flate2",
Expand Down Expand Up @@ -326,13 +325,6 @@ dependencies = [
"winapi 0.3.6",
]

[[package]]
name = "cargo-platform"
version = "0.1.0"
dependencies = [
"serde",
]

[[package]]
name = "cargo-test-macro"
version = "0.1.0"
Expand Down Expand Up @@ -534,7 +526,7 @@ name = "compiletest"
version = "0.0.0"
dependencies = [
"diff",
"env_logger 0.6.2",
"env_logger",
"getopts",
"lazy_static 1.3.0",
"libc",
Expand Down Expand Up @@ -605,6 +597,7 @@ version = "0.28.0"
dependencies = [
"curl",
"failure",
"http",
"percent-encoding 2.0.0",
"serde",
"serde_derive",
Expand Down Expand Up @@ -946,19 +939,6 @@ dependencies = [
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39ecdb7dd54465526f0a56d666e3b2dd5f3a218665a030b6e4ad9e70fa95d8fa"
dependencies = [
"atty",
"humantime",
"log",
"regex",
"termcolor",
]

[[package]]
name = "error-chain"
version = "0.12.0"
Expand Down Expand Up @@ -1887,7 +1867,7 @@ dependencies = [
"chrono",
"clap",
"elasticlunr-rs",
"env_logger 0.6.2",
"env_logger",
"error-chain",
"handlebars",
"itertools 0.8.0",
Expand All @@ -1912,7 +1892,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77d1f0ba4d1e6b86fa18e8853d026d7d76a97eb7eb5eb052ed80901e43b7fc10"
dependencies = [
"env_logger 0.6.2",
"env_logger",
"failure",
"log",
"mdbook",
Expand Down Expand Up @@ -2105,7 +2085,7 @@ dependencies = [
"colored",
"compiletest_rs",
"directories",
"env_logger 0.6.2",
"env_logger",
"getrandom",
"hex 0.3.2",
"log",
Expand Down Expand Up @@ -2514,7 +2494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61"
dependencies = [
"chrono",
"env_logger 0.6.2",
"env_logger",
"log",
]

Expand Down Expand Up @@ -2641,7 +2621,7 @@ dependencies = [
"bitflags",
"clap",
"derive_more",
"env_logger 0.6.2",
"env_logger",
"humantime",
"lazy_static 1.3.0",
"log",
Expand Down Expand Up @@ -2935,7 +2915,7 @@ dependencies = [
"clippy_lints",
"crossbeam-channel",
"difference",
"env_logger 0.6.2",
"env_logger",
"failure",
"futures",
"heck",
Expand Down Expand Up @@ -3019,7 +2999,7 @@ name = "rls-rustc"
version = "0.6.0"
dependencies = [
"clippy_lints",
"env_logger 0.6.2",
"env_logger",
"failure",
"futures",
"log",
Expand Down Expand Up @@ -3420,7 +3400,7 @@ dependencies = [
name = "rustc_driver"
version = "0.0.0"
dependencies = [
"env_logger 0.6.2",
"env_logger",
"graphviz",
"lazy_static 1.3.0",
"log",
Expand Down Expand Up @@ -3802,7 +3782,7 @@ dependencies = [
"derive-new",
"diff",
"dirs",
"env_logger 0.6.2",
"env_logger",
"failure",
"getopts",
"ignore",
Expand Down
6 changes: 2 additions & 4 deletions src/librustc/hir/map/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use syntax_pos::Span;
use std::iter::repeat;

use crate::ich::StableHashingContext;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableHasherResult};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};

/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
pub(super) struct NodeCollector<'a, 'hir> {
Expand Down Expand Up @@ -602,9 +602,7 @@ impl<'hir, T> HashStable<StableHashingContext<'hir>> for HirItemLike<T>
where
T: HashStable<StableHashingContext<'hir>>,
{
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'hir>,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'hir>, hasher: &mut StableHasher) {
hcx.while_hashing_hir_bodies(self.hash_bodies, |hcx| {
self.item_like.hash_stable(hcx, hasher);
});
Expand Down
7 changes: 2 additions & 5 deletions src/librustc/hir/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use std::{slice, vec};

use rustc_serialize::{Encodable, Decodable, Encoder, Decoder};

use rustc_data_structures::stable_hasher::{StableHasher, StableHasherResult,
HashStable};
use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
/// An owned smart pointer.
#[derive(Hash, PartialEq, Eq)]
pub struct P<T: ?Sized> {
Expand Down Expand Up @@ -133,9 +132,7 @@ impl<T: Decodable> Decodable for P<[T]> {
impl<CTX, T> HashStable<CTX> for P<T>
where T: ?Sized + HashStable<CTX>
{
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut CTX,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
(**self).hash_stable(hcx, hasher);
}
}
32 changes: 9 additions & 23 deletions src/librustc/ich/hcx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use syntax_pos::{Span, DUMMY_SP};
use syntax_pos::hygiene;

use rustc_data_structures::stable_hasher::{
HashStable, StableHasher, StableHasherResult, ToStableHashKey,
HashStable, StableHasher, ToStableHashKey,
};
use rustc_data_structures::fx::{FxHashSet, FxHashMap};
use smallvec::SmallVec;
Expand Down Expand Up @@ -219,9 +219,7 @@ impl<'a> StableHashingContextProvider<'a> for StableHashingContext<'a> {
impl<'a> crate::dep_graph::DepGraphSafe for StableHashingContext<'a> {}

impl<'a> HashStable<StableHashingContext<'a>> for hir::BodyId {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
if hcx.hash_bodies() {
hcx.body_resolver.body(*self).hash_stable(hcx, hasher);
}
Expand All @@ -230,9 +228,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for hir::BodyId {

impl<'a> HashStable<StableHashingContext<'a>> for hir::HirId {
#[inline]
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
match hcx.node_id_hashing_mode {
NodeIdHashingMode::Ignore => {
// Don't do anything.
Expand Down Expand Up @@ -263,9 +259,7 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for hir::HirId {
}

impl<'a> HashStable<StableHashingContext<'a>> for ast::NodeId {
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
match hcx.node_id_hashing_mode {
NodeIdHashingMode::Ignore => {
// Don't do anything.
Expand Down Expand Up @@ -298,9 +292,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for Span {
/// codepoint offsets. For the purpose of the hash that's sufficient.
/// Also, hashing filenames is expensive so we avoid doing it twice when the
/// span starts and ends in the same file, which is almost always the case.
fn hash_stable<W: StableHasherResult>(&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
const TAG_VALID_SPAN: u8 = 0;
const TAG_INVALID_SPAN: u8 = 1;
const TAG_EXPANSION: u8 = 0;
Expand Down Expand Up @@ -379,24 +371,18 @@ impl<'a> HashStable<StableHashingContext<'a>> for Span {
}

impl<'a> HashStable<StableHashingContext<'a>> for DelimSpan {
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>,
) {
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
self.open.hash_stable(hcx, hasher);
self.close.hash_stable(hcx, hasher);
}
}

pub fn hash_stable_trait_impls<'a, W>(
pub fn hash_stable_trait_impls<'a>(
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>,
hasher: &mut StableHasher,
blanket_impls: &[DefId],
non_blanket_impls: &FxHashMap<fast_reject::SimplifiedType, Vec<DefId>>,
) where
W: StableHasherResult,
{
) {
{
let mut blanket_impls: SmallVec<[_; 8]> = blanket_impls
.iter()
Expand Down
Loading