Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4548eb8
Clarify the behaviour of Pattern when used with methods like str::con…
poliorcetics Jun 2, 2020
6f6620b
Rename "cyclone" to "apple-a7" per changes in upstream LLVM
trevyn Jun 7, 2020
fb58b7b
Add compare-mode=chalk and add a little bit more implementations and …
jackh726 May 13, 2020
045dfc0
Update chalk
jackh726 May 13, 2020
6ba003e
Update chalk
jackh726 May 27, 2020
3d73030
Use builtin types for Never, Array, and FnDef
jackh726 May 27, 2020
2544b8c
Implement fn_def_datum
jackh726 May 27, 2020
7f2708c
Remove RustDefId
jackh726 May 27, 2020
ebdc950
Test error order is non-deterministic
jackh726 May 27, 2020
1d8264a
Update Chalk
jackh726 May 27, 2020
6172e9a
Update chalk and add LifetimeOutlives and ObjectSafe lowering
jackh726 May 30, 2020
7a5b939
Lower consts
jackh726 May 30, 2020
4028c21
Fix building
jackh726 May 30, 2020
8aa2898
Update chalk to 0.11.0
jackh726 Jun 2, 2020
852313a
Nits and change skip_binder to no_bound_vars for fndef
jackh726 Jun 3, 2020
645af62
Change InternedAdtDef to &'tcx AdtDef
jackh726 Jun 3, 2020
4cf2833
Return type is bound too
jackh726 Jun 3, 2020
687767a
Suggest substituting `'static` lifetime in impl/dyn `Trait + 'static`…
estebank May 29, 2020
c91320f
When `'static` is explicit, suggest constraining argument with it
estebank May 30, 2020
abf74b9
Reduce verbosity of suggestion message and mention lifetime in label
estebank May 30, 2020
50c422e
Move overlapping span to a note
estebank May 30, 2020
17951e2
Tweak output for overlapping required/captured spans
estebank May 30, 2020
19bb589
Tweak wording and add error code
estebank May 30, 2020
3cfecde
review comments: wording
estebank Jun 1, 2020
bdfb9b1
Use note for requirement source span
estebank Jun 2, 2020
215de3b
Register new eror code
estebank Jun 2, 2020
187e105
small tweaks
estebank Jun 2, 2020
6145918
Change E0758 to E0759 to avoid conflict with #72912
estebank Jun 3, 2020
754da88
Make `fn_arg_names` return `Ident` instead of symbol
Aaron1011 Jun 11, 2020
2c11c35
Explain move errors that occur due to method calls involving `self`
Aaron1011 Jun 11, 2020
5902b2f
Use `fn_span` to point to the actual method call
Aaron1011 Jun 11, 2020
4646e2d
Run fmt
Aaron1011 Jun 12, 2020
57b54c4
Use the built cargo for cargotest.
ehuss Jun 12, 2020
b126f32
Fix links when pinging notification groups
LeSeulArtichaut Jun 12, 2020
249a46f
pretty/asm.rs should only be tested for x86_64 and not AArch64
yerke Jun 13, 2020
46f4e0d
Rollup merge of #72389 - Aaron1011:feature/move-fn-self-msg, r=nikoma…
RalfJung Jun 13, 2020
9753f69
Rollup merge of #72804 - estebank:opaque-missing-lts-in-fn-2, r=nikom…
RalfJung Jun 13, 2020
a94303c
Rollup merge of #72932 - poliorcetics:pattern-contains-behaviour, r=h…
RalfJung Jun 13, 2020
6fe9571
Rollup merge of #72936 - jackh726:chalk-more, r=nikomatsakis
RalfJung Jun 13, 2020
42601fb
Rollup merge of #73086 - trevyn:apple-a7, r=nikic
RalfJung Jun 13, 2020
183c247
Rollup merge of #73267 - ehuss:cargotest-this-cargo, r=Mark-Simulacrum
RalfJung Jun 13, 2020
7448fd6
Rollup merge of #73290 - LeSeulArtichaut:patch-1, r=Dylan-DPC
RalfJung Jun 13, 2020
ceb0d04
Rollup merge of #73308 - yerke:fix-pretty-asm-rs-test-for-aarch64, r=…
RalfJung Jun 13, 2020
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
Prev Previous commit
Next Next commit
Nits and change skip_binder to no_bound_vars for fndef
  • Loading branch information
jackh726 committed Jun 8, 2020
commit 852313a46e513cbba4e5f4baf094e4a7088b01ff
12 changes: 7 additions & 5 deletions src/librustc_traits/chalk/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use rustc_middle::traits::ChalkRustInterner as RustInterner;
use rustc_middle::ty::subst::{InternalSubsts, Subst, SubstsRef};
use rustc_middle::ty::{self, AssocItemContainer, AssocKind, TyCtxt};
use rustc_middle::ty::{self, AssocItemContainer, AssocKind, Binder, TyCtxt};

use rustc_hir::def_id::DefId;

Expand Down Expand Up @@ -177,10 +177,12 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
.filter_map(|wc| LowerInto::<Option<chalk_ir::QuantifiedWhereClause<RustInterner<'tcx>>>>::lower_into(wc, &self.interner)).collect();

let sig = self.tcx.fn_sig(def_id);
// FIXME(chalk): Why does this have a Binder
let argument_types = sig
.inputs()
.skip_binder()
// FIXME(chalk): collect into an intermediate SmallVec here since
// we need `TypeFoldable` for `no_bound_vars`
let argument_types: Binder<Vec<_>> = sig.map_bound(|i| i.inputs().iter().copied().collect());
let argument_types = argument_types
.no_bound_vars()
.expect("FIXME(chalk): late-bound fn parameters not supported in chalk")
.iter()
.map(|t| t.subst(self.tcx, &bound_vars).lower_into(&self.interner))
.collect();
Expand Down
1 change: 0 additions & 1 deletion src/librustc_traits/chalk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ crate fn evaluate_goal<'tcx>(
.map(|s| match s {
Solution::Unique(_subst) => {
// FIXME(chalk): handle constraints
// assert!(_subst.value.constraints.is_empty());
make_solution(_subst.value.subst)
}
Solution::Ambig(_guidance) => {
Expand Down
15 changes: 15 additions & 0 deletions src/test/ui/chalkify/inherent_impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// run-pass
// compile-flags: -Z chalk
// FIXME(chalk): remove when uncommented
#![allow(dead_code, unused_variables)]

trait Foo { }

Expand All @@ -9,6 +11,8 @@ struct S<T: Foo> {
x: T,
}

// FIXME(chalk): need late-bound regions on FnDefs
/*
fn only_foo<T: Foo>(_x: &T) { }

impl<T> S<T> {
Expand All @@ -17,6 +21,7 @@ impl<T> S<T> {
only_foo(&self.x)
}
}
*/

trait Bar { }
impl Bar for u32 { }
Expand All @@ -26,17 +31,27 @@ fn only_bar<T: Bar>() { }
impl<T> S<T> {
// Test that the environment of `dummy_bar` adds up with the environment
// of the inherent impl.
// FIXME(chalk): need late-bound regions on FnDefs
/*
fn dummy_bar<U: Bar>(&self) {
only_foo(&self.x);
only_bar::<U>();
}
*/
fn dummy_bar<U: Bar>() {
only_bar::<U>();
}
}

fn main() {
let s = S {
x: 5,
};

// FIXME(chalk): need late-bound regions on FnDefs
/*
s.dummy_foo();
s.dummy_bar::<u32>();
*/
S::<i32>::dummy_bar::<u32>();
}