Update expect tests

This commit is contained in:
Zac Pullar-Strecker 2020-07-31 14:34:49 +12:00
parent 9522a06fd4
commit 1fa842c8c9
3 changed files with 424 additions and 169 deletions

View File

@ -212,9 +212,7 @@ pub fn resolver<D: DefDatabase + HirDatabase>(&self, db: &D) -> Option<Resolver>
ModuleDef::EnumVariant(ev) => {
GenericDefId::from(GenericDef::from(ev.clone())).resolver(db)
}
ModuleDef::Const(c) => {
GenericDefId::from(GenericDef::from(c.clone())).resolver(db)
}
ModuleDef::Const(c) => GenericDefId::from(GenericDef::from(c.clone())).resolver(db),
ModuleDef::Static(s) => StaticId::from(s.clone()).resolver(db),
ModuleDef::Trait(t) => TraitId::from(t.clone()).resolver(db),
ModuleDef::TypeAlias(t) => ModuleId::from(t.module(db)).resolver(db),

File diff suppressed because it is too large Load Diff

View File

@ -53,9 +53,11 @@ fn rust_files_are_tidy() {
fn check_licenses() {
let expected = "
0BSD OR MIT OR Apache-2.0
Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
Apache-2.0 OR BSL-1.0
Apache-2.0 OR MIT
Apache-2.0/MIT
Apache-2.0
BSD-2-Clause
BSD-3-Clause
CC0-1.0
@ -82,7 +84,10 @@ fn check_licenses() {
.collect::<Vec<_>>();
licenses.sort();
licenses.dedup();
assert_eq!(licenses, expected);
assert_eq!(
licenses.iter().filter(|license| !expected.contains(license)).collect::<Vec<_>>(),
Vec::<&&str>::new()
);
}
fn check_todo(path: &Path, text: &str) {