ENCODE ATAC-seq pipeline
The Rust Programming Language Blog
A PROLOG-ish interpreter written in Rust, intended eventually for use in the compiler
Empowering everyone to build reliable and efficient software.
Rust teams structure
UCSC Genome Browser Hub Builder
Home of the "traits working group", affiliated with the compiler and lang teams.
pull request commentrust-lang/chalk
Program printer: Use Debug to print concrete consts
@bors r+
comment created time in 12 hours
push eventjackh726/rust
commit sha 41ce3979902a1b1f02679b224b968c6c4cf12554
Make anonymous binders start at 0
push time in a day
PR opened rust-lang/rust
A few changes to some test outputs, but these actually look more correct to me.
pr created time in a day
pull request commentrust-lang/chalk
Replace bound lifetime variables with inference variables in AntiUnifier
@bors r+
comment created time in a day
pull request commentrust-lang/rust
Oh, there was a test failure
comment created time in 2 days
Pull request review commentrust-lang/rust
impl<'tcx> LowerInto<'tcx, chalk_solve::rust_ir::TraitBound<RustInterner<'tcx>>> } } +impl<'tcx> LowerInto<'tcx, chalk_solve::rust_ir::Polarity> for ty::ImplPolarity {+ fn lower_into(self, _interner: &RustInterner<'tcx>) -> chalk_solve::rust_ir::Polarity {+ match self {+ ty::ImplPolarity::Positive => chalk_solve::rust_ir::Polarity::Positive,+ ty::ImplPolarity::Negative => chalk_solve::rust_ir::Polarity::Negative,+ // FIXME(chalk) reservation impls
Hmm, I guess another thing to discuss at some point :)
comment created time in 2 days
Pull request review commentrust-lang/rust
+// check-pass+// compile-flags: -Z chalk++use std::fmt::Display;++fn main() {+ let d: &dyn Display = &mut 3;+ // FIXME(chalk) should be able to call d.to_string() as well, but doing so
Does rust-lang/chalk#638 fix this?
comment created time in 2 days
Pull request review commentrust-lang/rust
impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t &self, opaque_ty_id: chalk_ir::OpaqueTyId<RustInterner<'tcx>>, ) -> Arc<chalk_solve::rust_ir::OpaqueTyDatum<RustInterner<'tcx>>> {- let bound_vars = bound_vars_for_item(self.interner.tcx, opaque_ty_id.0);- let binders = binders_for(&self.interner, bound_vars);+ let bound_vars = ty::fold::shift_vars(+ self.interner.tcx,+ &bound_vars_for_item(self.interner.tcx, opaque_ty_id.0),+ 1,+ ); let where_clauses = self.where_clauses_for(opaque_ty_id.0, bound_vars);- let bounds = self.bounds_for(opaque_ty_id.0, bound_vars);++ let identity_substs = InternalSubsts::identity_for_item(self.interner.tcx, opaque_ty_id.0);++ let bounds =+ self.interner+ .tcx+ .explicit_item_bounds(opaque_ty_id.0)+ .iter()+ .map(|(bound, _)| bound.subst(self.interner.tcx, &bound_vars))+ .map(|bound| {+ bound.fold_with(&mut ty::fold::BottomUpFolder {+ tcx: self.interner.tcx,+ ty_op: |ty| {+ if let ty::Opaque(def_id, substs) = *ty.kind() {+ if def_id == opaque_ty_id.0 && substs == identity_substs {+ return self.interner.tcx.mk_ty(ty::Bound(+ ty::INNERMOST,+ ty::BoundTy::from(ty::BoundVar::from_u32(0)),+ ));+ }+ }
So, what is this for? Rustc uses the self opaque ty with identity substs instead of ^0.0?
comment created time in 2 days
Pull request review commentrust-lang/rust
impl<'tcx> LowerInto<'tcx, chalk_ir::AliasEq<RustInterner<'tcx>>> impl<'tcx> LowerInto<'tcx, chalk_ir::Ty<RustInterner<'tcx>>> for Ty<'tcx> { fn lower_into(self, interner: &RustInterner<'tcx>) -> chalk_ir::Ty<RustInterner<'tcx>> {- use chalk_ir::TyData; use rustc_ast as ast;- use TyKind::*; - let empty = || chalk_ir::Substitution::empty(interner);- let struct_ty =- |def_id| chalk_ir::TypeName::Adt(chalk_ir::AdtId(interner.tcx.adt_def(def_id)));- let apply = |name, substitution| {- TyData::Apply(chalk_ir::ApplicationTy { name, substitution }).intern(interner)- };- let int = |i| apply(chalk_ir::TypeName::Scalar(chalk_ir::Scalar::Int(i)), empty());- let uint = |i| apply(chalk_ir::TypeName::Scalar(chalk_ir::Scalar::Uint(i)), empty());- let float = |f| apply(chalk_ir::TypeName::Scalar(chalk_ir::Scalar::Float(f)), empty());+ let int = |i| chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Int(i));+ let uint = |i| chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Uint(i));+ let float = |f| chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Float(f)); match *self.kind() {- Bool => apply(chalk_ir::TypeName::Scalar(chalk_ir::Scalar::Bool), empty()),- Char => apply(chalk_ir::TypeName::Scalar(chalk_ir::Scalar::Char), empty()),- Int(ty) => match ty {+ ty::Bool => chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Bool),+ ty::Char => chalk_ir::TyKind::Scalar(chalk_ir::Scalar::Char),+ ty::Int(ty) => match ty { ast::IntTy::Isize => int(chalk_ir::IntTy::Isize), ast::IntTy::I8 => int(chalk_ir::IntTy::I8), ast::IntTy::I16 => int(chalk_ir::IntTy::I16), ast::IntTy::I32 => int(chalk_ir::IntTy::I32), ast::IntTy::I64 => int(chalk_ir::IntTy::I64), ast::IntTy::I128 => int(chalk_ir::IntTy::I128), },- Uint(ty) => match ty {+ ty::Uint(ty) => match ty { ast::UintTy::Usize => uint(chalk_ir::UintTy::Usize), ast::UintTy::U8 => uint(chalk_ir::UintTy::U8), ast::UintTy::U16 => uint(chalk_ir::UintTy::U16), ast::UintTy::U32 => uint(chalk_ir::UintTy::U32), ast::UintTy::U64 => uint(chalk_ir::UintTy::U64), ast::UintTy::U128 => uint(chalk_ir::UintTy::U128), },- Float(ty) => match ty {+ ty::Float(ty) => match ty { ast::FloatTy::F32 => float(chalk_ir::FloatTy::F32), ast::FloatTy::F64 => float(chalk_ir::FloatTy::F64), },- Adt(def, substs) => apply(struct_ty(def.did), substs.lower_into(interner)),- Foreign(def_id) => apply(chalk_ir::TypeName::Foreign(ForeignDefId(def_id)), empty()),- Str => apply(chalk_ir::TypeName::Str, empty()),- Array(ty, len) => {- let value = match len.val {- ty::ConstKind::Value(val) => {- chalk_ir::ConstValue::Concrete(chalk_ir::ConcreteConst { interned: val })- }- ty::ConstKind::Bound(db, bound) => {- chalk_ir::ConstValue::BoundVar(chalk_ir::BoundVar::new(- chalk_ir::DebruijnIndex::new(db.as_u32()),- bound.index(),- ))- }- _ => unimplemented!("Const not implemented. {:?}", len.val),- };- apply(- chalk_ir::TypeName::Array,- chalk_ir::Substitution::from_iter(- interner,- &[- chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(interner),- chalk_ir::GenericArgData::Const(- chalk_ir::ConstData { ty: len.ty.lower_into(interner), value }- .intern(interner),- )- .intern(interner),- ],- ),- )+ ty::Adt(def, substs) => {+ chalk_ir::TyKind::Adt(chalk_ir::AdtId(def), substs.lower_into(interner)) }- Slice(ty) => apply(- chalk_ir::TypeName::Slice,- chalk_ir::Substitution::from1(- interner,- chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(interner),- ),- ),- RawPtr(ptr) => {- let name = match ptr.mutbl {- ast::Mutability::Mut => chalk_ir::TypeName::Raw(chalk_ir::Mutability::Mut),- ast::Mutability::Not => chalk_ir::TypeName::Raw(chalk_ir::Mutability::Not),- };- apply(name, chalk_ir::Substitution::from1(interner, ptr.ty.lower_into(interner)))+ ty::Foreign(def_id) => chalk_ir::TyKind::Foreign(ForeignDefId(def_id)),+ ty::Str => chalk_ir::TyKind::Str,+ ty::Array(ty, len) => {+ chalk_ir::TyKind::Array(ty.lower_into(interner), len.lower_into(interner)) }- Ref(region, ty, mutability) => {- let name = match mutability {- ast::Mutability::Mut => chalk_ir::TypeName::Ref(chalk_ir::Mutability::Mut),- ast::Mutability::Not => chalk_ir::TypeName::Ref(chalk_ir::Mutability::Not),- };- apply(- name,- chalk_ir::Substitution::from_iter(- interner,- &[- chalk_ir::GenericArgData::Lifetime(region.lower_into(interner))- .intern(interner),- chalk_ir::GenericArgData::Ty(ty.lower_into(interner)).intern(interner),- ],- ),- )+ ty::Slice(ty) => chalk_ir::TyKind::Slice(ty.lower_into(interner)),++ ty::RawPtr(ptr) => match ptr.mutbl {
I guess this is preexisting, but we can probably just impl LowerInto for ast::Mutability to chalk_ir::Mutability and clean this and Ref up a bit.
comment created time in 2 days
push eventjackh726/rust
commit sha 3eddaee7b609c49ea7e8bb795f87198214dfffd5
Some bind -> dummy
commit sha 4eb319a6e830e6cc92c465df5a56fb27193ac1ef
objet_safety update
push time in 3 days
Pull request review commentrust-lang/chalk
fn push_program_clauses_for_associated_type_values_in_impls_of<I: Interner>( } } +fn push_alias_implemented_clause<I: Interner>(+ builder: &mut ClauseBuilder<'_, I>,+ trait_ref: &TraitRef<I>,+ alias: &AliasTy<I>,+) {+ let interner = builder.interner();+ assert_eq!(+ *trait_ref.self_type_parameter(interner).kind(interner),+ TyKind::Alias(alias.clone())+ );++ let binders = Binders::with_fresh_type_var(interner, |ty_var| ty_var);++ // forall<..., T> {+ // <X as Y>::Z: Trait :- T: Trait, <X as Y>::Z == T
This looks to me a lot like the sem-to-syn equality work
comment created time in 3 days
push eventjackh726/rust
commit sha b203b8902e809a78e848c5c69e87b986ad3ea55f
Add rebind_checked and start to use it in a few places we don't know
commit sha 57befd3797829e9215834c5516807a212d2e5cd1
Make closure_env_ty explicity bind a single BrEnv always; fuse binders (and check) when used
push time in 3 days
push eventdaboross/chalk
commit sha 5988b80210d5303550dda341d4da899857e46b2f
Fix lifetime variance and change name
push time in 4 days
push eventdaboross/chalk
commit sha ee6b3d1db9c12677955455a4879e0ee87d02d589
Fix unify_lifetime_var
push time in 6 days
pull request commentrust-lang/rust
make `super_relate_consts` use trait objects
Perf is basically neutral and this just increases complexity. I'm not sure the tradeoff is worth it.
comment created time in 7 days
push eventdaboross/chalk
commit sha 30134cfa574957eb151df860a725541fc664ab4b
Remove TypeName
commit sha a16d835fbab7bc48446c6b1d3c8fc69d40033fc4
Change Substitution on Array to Ty and Const
commit sha 2eb55ac52dc41ef59d2e7c9d1f04f554e6f44a2a
Change Substitution in Slice to Ty
commit sha 1ade3184d4d4147aa00e75ebf904cf633aed92f6
Remove remaining unneeded substitutions
commit sha ea532e03adfeb7fa6cc68881a1205a2f3d2b1933
Cleanups
commit sha fd295d6c79d802866f59d2aba192894bc185632e
Links
commit sha 420e9379dc1dbe5f022854ed452f7682cd0136a2
Auto merge of #629 - jackh726:typename, r=matthewjasper Remove TypeName and merge into TyKind
commit sha dfe265933fc450054d9e8a9dfdbb79d0b7a1b6f5
Document notation
commit sha fe18075c1566f2934d4ba7db015717858dab31f4
Fix `SUMMARY.md` link
commit sha 613e664c2d3ef25421175075c6522876ef73e624
Format parse errors better Previously the parser printed parse errors with Debug formatting, even though Display formatting is implemented and looks much better. Before: ?- load libstd.chalk ?- forall<T: Clone> { Vec<T>: Clone } error: parse error: UnrecognizedToken { token: (8, Token(17, ":"), 9), expected: ["\",\"", "\">\""] } position: `forall<T: Clone> { Vec<T>: Clone }` ^ After: ?- load libstd.chalk ?- forall<T: Clone> { Vec<T>: Clone } error: parse error: Unrecognized token `:` found at 8:9 Expected one of "," or ">" position: `forall<T: Clone> { Vec<T>: Clone }` ^
commit sha a698320f82c0846c607cd9453f55e4ba60c7e11f
Auto merge of #632 - camelid:better-parse-errors, r=jackh726 Format parse errors better Previously the parser printed parse errors with Debug formatting, even though Display formatting is implemented and looks much better. Before: ?- load libstd.chalk ?- forall<T: Clone> { Vec<T>: Clone } error: parse error: UnrecognizedToken { token: (8, Token(17, ":"), 9), expected: ["\",\"", "\">\""] } position: `forall<T: Clone> { Vec<T>: Clone }` ^ After: ?- load libstd.chalk ?- forall<T: Clone> { Vec<T>: Clone } error: parse error: Unrecognized token `:` found at 8:9 Expected one of "," or ">" position: `forall<T: Clone> { Vec<T>: Clone }` ^
commit sha d3ff2e2772edb1ba349314a5836b5dd8a37203aa
Explain bound variables some more
commit sha bfb3f83d90e5968cc7a601622e7c08802642c336
rewrite parts concerning typename, fix links
commit sha ef3b57660bc7f7a49673de4c1eb861b8aed38ba8
Clean up coherence chapter * Fix formatting * Use `notrust` for code blocks with invalid Rust syntax * Use Unicode instead of LaTeX (LaTeX isn't supported)
commit sha fc7cb87350411cc7ecfbb2fc70c20bf0db1b511d
Auto merge of #630 - camelid:notation-docs, r=jackh726 Document notation Fixes #561.
commit sha f7a2862c56c257be574a54288cd4ffc438d12385
Auto merge of #634 - Areredify:book_typename_fix, r=jackh726 rewrite parts concerning typename, fix links fixes #631
commit sha b7ac5f03261c163839364aa4f0af835672a4679e
Fix glossary links
commit sha e77213dfbea019d1928788b7c23a7002cf01f178
Auto merge of #635 - jackh726:book-fix, r=jackh726 Fix glossary links Just fixing these links. Will probably just merge these on CI green since these are trivial.
commit sha 9d055d85a8537ee5ee9fdcb1e602351a918e2df2
Add Variance and use it for zip Merge of the following 17 commits by Jack Huey: Remove Zip impl for Substitution and add zip_substs Add unification database fn_def_variance and adt_variance Use actual variances when zipping Introduce FnSubst to wrap Fn subst logic Just use self.variance WIP begin adding subtypegoal Pass ambient variance to zip_substs no with_local_variance, instead zip_with calls xform Relate alias to ty rename unify to relate Start adding subtype tests Fail if trying to subtype to inference vars Use Variances not Vec<Variance> Some renames Review comments
commit sha dcb4423766fc874583394335415f42031eccda44
WIP: Implement generalizing in unify This implements the rough equivalent of the rustc Generalizer in the chalk variance code. This needs significant refactoring, and does not yet pass all tests, however it implements all core functionality. We don't fully understand the Generalizer, and this thus most likely contains errors. Co-authored-by: Super Tuple <[email protected]>
push time in 7 days
PR opened rust-lang/chalk
Just fixing these links. Will probably just merge these on CI green since these are trivial.
pr created time in 7 days
pull request commentrust-lang/chalk
rewrite parts concerning typename, fix links
Thanks!
@bors r+
comment created time in 7 days
Pull request review commentrust-lang/chalk
Add `DiscriminantKind` builtin trait
+use super::*;
Can you write some comments here for what each of the test goals are supposed to be for?
comment created time in 7 days
Pull request review commentrust-lang/chalk
Add `DiscriminantKind` builtin trait
fn coerce_unsized_struct() { } } }++#[test]+fn no_discriminant_kind_impls() {
Can we move this to discriminant_kind test file? Would like to start putting related tests together.
comment created time in 7 days
push eventweng-lab/krews
commit sha d060cf1790a742460573c95f2593144a848efe5e
Add delay when partial success
push time in 8 days
pull request commentrust-lang/chalk
So, looks like a bunch of stuff in coherence.md isn't correct. Feel free to either 1) fix the errors with notrust or 2) just change the SUMMARY back and ignore the coherence doc for now.
I think the rust,ignore is working for the glossary.
comment created time in 8 days
Pull request review commentrust-lang/chalk
This is a glossary of terminology (possibly) used in the chalk crate. +## Notation++### Basic notation++| Notation | Meaning |+|--------------|----------------------------------|+| `?0` | [Type inference variable] |+| `^0`, `^1.0` | [Bound variable] |+| `!0` | [Placeholder] |
Yeah, so maybe it's worth describing the syntax here a bit. I'll describe a little bit here. I'm not quite sure the best place to put this though. (Or how much might be duplicated from other places in the book)
Inference variables have the format ?0. This means that in the current inference context, this is variable 0.
Bound variables can take the format of ^1.0 or ^0. In the former case, the 1 represents the Debruijn index of the variable. The 0 represents the index in that level of binding. For example, in forall<X,Y> { forall <Z> { X } }, X could be represented as ^1.0. If the Debruijn index is 0, then it may sometimes be omitted, leading the the second format ^0.
Placeholders take the format !1_0 or !0. For the former, the 1 is universe index of the placeholder whereas the 0 is the index in that universe. If the universe is 0, then it can be omitted, leading to the second format.
I'm not sure if this is the right place to explain placeholders vs bound or inference vars. I would have to think of a good explanation anyways. Let's just focus on notation here, for now.
comment created time in 8 days
push eventjackh726/rust
commit sha 08499f56a86701b4b48ffd5d18123fefee485a7c
Add u32 for bound variables to Binder
commit sha 2982fcd644c7759dc4df610863ced70962b70c45
count bound vars
commit sha 3ec97eb4436396b39e722604062411009948aba0
Remove ToPredicate impl for PolyTraitRef Remove ToPredicate impl for TraitRef Use PolyTraitRef more in project Make to_opt_poly_trait_ref use rebind Make to_opt_type_outlives not rebind More rebinds More Last of the easy binds Fixes
commit sha 4c75def025812b3aa5f1c8e97c8444be2b1dc803
Add tcx lifetime to Binder
commit sha 65c86c740ec58448c9a1ed75d9d35a6e0dd456fd
Track bound vars
commit sha e4e3bac8e3c71f80a665234e6f3e9dde29d59627
Fixes
push time in 8 days
Pull request review commentrust-lang/chalk
- [Opaque types (impl Trait)](./clauses/opaque_types.md) - [Well known traits](./clauses/well_known_traits.md) - [Well-formedness checking](./clauses/wf.md)- - [Coherence](./coherence.md)
Ah oops. It should be ./clauses/coherence.md. That's an error from #623
comment created time in 8 days
Pull request review commentrust-lang/chalk
This is a glossary of terminology (possibly) used in the chalk crate. +## Notation++### Basic notation++| Notation | Meaning |+|--------------|----------------------------------|+| `?0` | [Type inference variable] |+| `^0`, `^1.0` | [Bound variable] |+| `!0` | [Placeholder] |
These look right. If these confuse you though, they most certainly confuse someone else. So, what confuses you?
comment created time in 8 days
Pull request review commentrust-lang/chalk
- [Opaque types (impl Trait)](./clauses/opaque_types.md) - [Well known traits](./clauses/well_known_traits.md) - [Well-formedness checking](./clauses/wf.md)- - [Coherence](./coherence.md)
Why remove this?
comment created time in 8 days
pull request commentrust-lang/chalk
Remove TypeName and merge into TyKind
@camelid we specifically don't block merge on linkcheck; we've seen false positives before and in general don't want it to hold up CI anyways
comment created time in 8 days
push eventjackh726/rust
commit sha b4a4921b460aef2fe41ed3e041219a0e4c9fb7cb
Remove ToPredicate impl for PolyTraitRef Remove ToPredicate impl for TraitRef Use PolyTraitRef more in project Make to_opt_poly_trait_ref use rebind Make to_opt_type_outlives not rebind More rebinds More Last of the easy binds Fixes
commit sha 91136eafa50b9a60f1d20324e3ad168f819e27d5
Add tcx lifetime to Binder
commit sha cc28c2da912e60967d5afe1faeefa2ab68e96116
Track bound vars
commit sha aa638d92c580d52a556c288cc9688750b14c2818
Fixes
push time in 8 days
issue commentrust-lang/chalk
add flags to `InternedTy` and `InternedRegion` types
What do we need flags for on lifetimes? In rustc, there are only flags on types, I thought?
Definition in rustc: https://github.com/rust-lang/rust/blob/a9cd294cf2775441e713c7ee2918b728733b99f5/compiler/rustc_middle/src/ty/mod.rs#L501
Going to mark this as a good first issue, since this should be fairly straightforward.
comment created time in 8 days
PR opened rust-lang/team
@matthewjasper this should help with bors 😉
pr created time in 8 days
push eventjackh726/team
commit sha 992a16c500795bcbcda8e3d9d74a1248d8f61a46
Add matthewjasper to wg-traits
push time in 8 days
pull request commentrust-lang/chalk
Remove TypeName and merge into TyKind
@bors r=matthewjasper
comment created time in 8 days
push eventjackh726/rust
commit sha fd22e87afc9082522bc7b52e32d25d43c64594e6
fix flag computation for `ExistentialPredicate::Projection`
commit sha 7652b4b1d9cec0ad22f529a4335d05f7d7792521
guard against `skip_binder` errors during FlagComputation
commit sha 77e6c56ab6f108fdbb8acbd176497be9f074af9a
Unify `&mut` and `&raw mut` const-checking errors
commit sha c1494d60dbad39c218e7b0825bfe590cc22bf2fa
Bless tests
commit sha 64839ee00ab4076d797901ddea55f2613c5b75b5
Add Pin::new_static.
commit sha 390883e888c580d054ab4a2584c851aba50865e9
Make Pin::new_static const.
commit sha bd135674814d74ca6fca3ab79d778ecaaeb02cf5
Allow setting up git hooks from other worktrees
commit sha 0ec3ea9e697ea9c2ce225ba0b9f3715434fc773e
const keyword: brief paragraph on 'const fn'
commit sha c8405d2251ce78651f591ed8a2189c41593f5110
fix markdown reference Co-authored-by: Dariusz Niedoba <[email protected]>
commit sha 39b0e7928579c4ce3a42e849695f9380b7869d62
Remove generic argument from `QueryConfig`.
commit sha 104c0f0194177442ff16cf14907a96d2f8d200dd
Rename Pin::new_static to Pin::static_ref.
commit sha 2c71f682d74d13ae6673dc701a9bb3a0562f57c0
Add Pin::static_mut.
commit sha 5573a163530f12a38a865b67eb7994414e9cd49c
Use `try{}` in `try_fold` to decouple library from `Try` details
commit sha f83446b836900ce9afbaa0816a5b4feda654b51e
Reword safety guarantee of Pin::static_{ref,mut}. Co-authored-by: Peter Todd <[email protected]>
commit sha 8374c1702c1d9858d8906051cd531757be63998d
Bump the version of rustfmt used in tidy To pick up https://github.com/rust-lang/rustfmt/pull/4461 So that rustfmt has the parsing fix from https://github.com/rust-lang/rust/pull/76274 ...and do a reformat that it wants.
commit sha 058699d0a2fca02127761f014d0ecfce1c5541ec
[net] clippy: needless_update warning: struct update has no effect, all the fields in the struct have already been specified --> library/std/src/net/addr.rs:367:19 | 367 | ..unsafe { mem::zeroed() } | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::needless_update)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
commit sha e6dc604e8b184b1224ae7acf58f06fa021ece82c
[net] clippy: match_like_matches_macro warning: match expression looks like `matches!` macro --> library/std/src/net/ip.rs:459:9 | 459 | / match self.octets() { 460 | | [169, 254, ..] => true, 461 | | _ => false, 462 | | } | |_________^ help: try this: `matches!(self.octets(), [169, 254, ..])` | = note: `#[warn(clippy::match_like_matches_macro)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro Signed-off-by: wcampbell <[email protected]>
commit sha 7a75f4418313da0173192ed4d2f198e505e11428
[net] clippy: identity_op warning: the operation is ineffective. Consider reducing it to `self.segments()[0]` --> library/std/src/net/ip.rs:1265:9 | 1265 | (self.segments()[0] & 0xffff) == 0xfe80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::identity_op)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op warning: the operation is ineffective. Consider reducing it to `self.segments()[1]` --> library/std/src/net/ip.rs:1266:16 | 1266 | && (self.segments()[1] & 0xffff) == 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op warning: the operation is ineffective. Consider reducing it to `self.segments()[2]` --> library/std/src/net/ip.rs:1267:16 | 1267 | && (self.segments()[2] & 0xffff) == 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op warning: the operation is ineffective. Consider reducing it to `self.segments()[3]` --> library/std/src/net/ip.rs:1268:16 | 1268 | && (self.segments()[3] & 0xffff) == 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op Signed-off-by: wcampbell <[email protected]>
commit sha 39867f3c9fea0e01b5b199d8c2b6b0889284cc85
Fixed false positive for `unused_parens` lint
commit sha 7da0e58da4f1a4a7f102eb5478dbd4e7fa7edbaf
use matches! in library/std/src/net/ip.rs Apply suggestion from review Co-authored-by: LingMan <[email protected]>
push time in 8 days
PR closed rust-lang/chalk
Fixes #548
For Chalk's tests, a special-formatted Option<u32> is used, where Some(n) evaluates to n and None evaluates to a specific but unknown constant. Some(n) is formatted as n? and None is formatted as ?.
pr closed time in 9 days
pull request commentrust-lang/chalk
We discussed this in our meeting Tuesday. The conclusion was that the PR as-is isn't correct (see @nikomatsakis's review). Part of this is we need better direction for how consts will be handled.
I'm going to go ahead and close this for now. @josh65536 if you still want to work on this, feel free to reopen. Either Niko or I can answer questions on here or, preferably, Zulip. We really would like to get this over the finish line :)
comment created time in 9 days
push eventjackh726/chalk
commit sha fd295d6c79d802866f59d2aba192894bc185632e
Links
push time in 9 days
push eventjackh726/chalk
commit sha ea532e03adfeb7fa6cc68881a1205a2f3d2b1933
Cleanups
push time in 9 days
push eventjackh726/chalk
commit sha a16d835fbab7bc48446c6b1d3c8fc69d40033fc4
Change Substitution on Array to Ty and Const
commit sha 2eb55ac52dc41ef59d2e7c9d1f04f554e6f44a2a
Change Substitution in Slice to Ty
commit sha 1ade3184d4d4147aa00e75ebf904cf633aed92f6
Remove remaining unneeded substitutions
push time in 9 days
push eventjackh726/chalk
commit sha 30134cfa574957eb151df860a725541fc664ab4b
Remove TypeName
push time in 9 days
push eventjackh726/chalk
commit sha 76e21915d62d3b30ff520e947da2592ed93f8834
Remove TypeName
push time in 9 days
push eventrust-lang/chalk
commit sha 21b44ab1c03061fc27ed3dfdc933a4dbe9c81425
Review comments
push time in 10 days
push eventrust-lang/chalk
commit sha 545231148d788aef28fdecb447676ca3ac110d14
Make ty_data return TyData and add ty_kind
push time in 10 days
push eventjackh726/rust
commit sha 03740b230cefbdb45bb8d28051b0c2d7a5969086
Fixes
push time in 11 days
pull request commentweng-lab/bigwig-reader
Also, just fyi @zoldello, you don't have to create a new issue per PR! (But feel free to do so if you find an issue but can't/don't want to make a PR)
Thanks again for your work here!
comment created time in 11 days
issue closedweng-lab/bigwig-reader
There is no documentation for ENCODE Parse Functions and custom parse function
There needs to be documentation explaining to users how to use ENCODE BigBed parse functions and how to create their own. Otherwise, there will be a tremendous hindrance to their usage and discoverability.
closed time in 11 days
zoldelloissue commentweng-lab/bigwig-reader
There is no documentation for ENCODE Parse Functions and custom parse function
Fixed by #22
comment created time in 11 days
push eventweng-lab/bigwig-reader
commit sha e37d571e155c7a2f1091c6497fa99bcca20b4d77
Added documentation for ENCODE BigBed parse functions and instructions of creating custom bigbed parser functions(Address issue #2) (#22) * export-parse-function * add-documentation-for-parseFunction * fix-install-doc
push time in 11 days
pull request commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
@nikomatsakis so, the goal of the PR as a whole is to test incrementally the changes to track bound vars.
The first naive perf run didn't really have any optimizations. It ended up being quite bad. Between then and the 2nd/3rd perf run, we merged the changes into master of a bunch of binds to rebinds and the PR here added the optimization for the no bound vars case.
comment created time in 11 days
push eventjackh726/rust
commit sha a3cdcdb7f52464c2b0d0c977e5b6c6f66c2fcf82
Remove ToPredicate impl for TraitRef
commit sha d3600b48731eef5567e85c963e94a32e8c745cd2
Use PolyTraitRef more in project
commit sha 7862a82529fb68683c23980bf8d8c7acd3baf17b
Make to_opt_poly_trait_ref use rebind
commit sha ea9f8ca9b5343013a6c704a76df70749fef238ee
Make to_opt_type_outlives not rebind
commit sha fadc5b387a8ef88f28aab1c7961cee757722b87b
More rebinds
commit sha 720b48bad726b50b7a591d65b060d3d625577adf
More
commit sha 4057045a90739daa1b751733100d5e9fd099377a
Last of the easy binds
commit sha 9bb9c777370b9bb963a94528b52cf33c7f121dd3
Fixes
commit sha 3d5fdc92f8f7942550320103a8c17cc437139cd1
Add tcx lifetime to Binder
commit sha 436ce90d08aa3e766d0b8b937d09096a18aefe62
Track bound vars
commit sha ea4add659c25d4dbb3e8acbce1662de4d74faa69
Fixes
push time in 12 days
Pull request review commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
impl<'tcx> PredicateVisitor<'tcx> for HasEscapingVarsVisitor { } } +crate struct CountBoundVars<'tcx> {+ crate outer_index: ty::DebruijnIndex,+ crate bound_tys: SsoHashSet<ty::BoundTy>,+ crate bound_regions: SsoHashSet<ty::BoundRegion>,+ crate bound_consts: SsoHashSet<ty::BoundVar>,+ crate visited: SsoHashSet<Ty<'tcx>>,+}++impl<'tcx> CountBoundVars<'tcx> {+ crate fn new() -> Self {+ CountBoundVars {+ outer_index: ty::INNERMOST,+ bound_tys: SsoHashSet::default(),+ bound_regions: SsoHashSet::default(),+ bound_consts: SsoHashSet::default(),+ visited: SsoHashSet::default(),+ }+ }+}++impl<'tcx> TypeVisitor<'tcx> for CountBoundVars<'tcx> {+ fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> bool {+ self.outer_index.shift_in(1);+ let result = t.super_visit_with(self);+ self.outer_index.shift_out(1);+ result+ }++ fn visit_ty(&mut self, t: Ty<'tcx>) -> bool {+ if t.outer_exclusive_binder >= self.outer_index || !self.visited.insert(t) {
Ugh yeah
comment created time in 12 days
push eventweng-lab/atacseq-workflow
commit sha 1f838fd981e6a9194770add261e8848cff870ced
Update filter task
commit sha 0e9dcd290f71926bf992a00758cf6b9721c2e516
Update trim-adapters
commit sha b75d1346eb0259af738794f4438196a1c00c3a48
Update bowtie2
commit sha aabb002d9336c852ba4333d95b5699c6faa797d2
Update bam2ta
commit sha ccf6b95e2ac6663bfe52812f8527d77eb3dc07a6
Update macs2
commit sha a11ef3df4d90aa3dbf05788be6e820901982eb3b
All the fixes to get it working
push time in 12 days
pull request commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
Ok, perf is good. Well, good in the sense that this is strictly more work than master, so this will obviously always be a regression. But a max of 10% is a good start to think about continuing forward.
comment created time in 12 days
pull request commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
So, um, yeah. Perf is...bad. Let's see if the latest commit helps; we should descend into types unless there are bound vars to check. And use SsoHashSet
comment created time in 12 days
push eventjackh726/rust
commit sha 103bca3b287e16a20702674916e9213b18a1fd53
trying to get better perf
push time in 12 days
push eventjackh726/rust
commit sha a5fa81cc545173d40d4489c213e333a098809886
trying to get better perf
push time in 12 days
Pull request review commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
impl<'tcx> PredicateVisitor<'tcx> for HasEscapingVarsVisitor { } } +crate struct CountBoundVars {+ crate outer_index: ty::DebruijnIndex,+ crate bound_tys: FxHashSet<ty::BoundTy>,+ crate bound_regions: FxHashSet<ty::BoundRegion>,+ crate bound_consts: FxHashSet<ty::BoundVar>,+}++impl<'tcx> TypeVisitor<'tcx> for CountBoundVars {+ fn visit_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> bool {+ self.outer_index.shift_in(1);+ let result = t.super_visit_with(self);+ self.outer_index.shift_out(1);+ result+ }++ fn visit_ty(&mut self, t: Ty<'tcx>) -> bool {+ match t.kind {+ ty::Bound(debruijn, ty) if debruijn >= self.outer_index => {
This was a typo. I did fix it in a later commit on my other branch. They aren't here, because I only wanted to test the minimal set of changes for perf. But yeah, good catch!
comment created time in 13 days
pull request commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
@camelid this PR isn't related to compile time
comment created time in 13 days
pull request commentrust-lang/rust
[WIP] Refactor `Binder` to track bound vars
I've rebased this on master, and these changes might change perf, so want to retest that.
comment created time in 13 days
push eventjackh726/rust
commit sha 41baa090ad1c40a7fc96f96664543ce4c26746c2
Skip dropck::check_drop_impl in is_const_item_without_destructor adt_destructor by default also validates the Drop impl using dropck::check_drop_impl, which contains an expect_local(). This leads to ICE in check_const_item_mutation if the const's type is not a local type. thread 'rustc' panicked at 'DefId::expect_local: `DefId(5:4805 ~ alloc[d7e9]::vec::{impl#50})` isn't local', compiler/rustc_span/src/def_id.rs:174:43 stack backtrace: 0: rust_begin_unwind 1: rustc_span::def_id::DefId::expect_local::{{closure}} 2: rustc_typeck::check::dropck::check_drop_impl 3: rustc_middle::ty::util::<impl rustc_middle::ty::context::TyCtxt>::calculate_dtor::{{closure}} 4: rustc_middle::ty::trait_def::<impl rustc_middle::ty::context::TyCtxt>::for_each_relevant_impl 5: rustc_middle::ty::util::<impl rustc_middle::ty::context::TyCtxt>::calculate_dtor 6: rustc_typeck::check::adt_destructor 7: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::adt_destructor>::compute 8: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl 9: rustc_query_system::query::plumbing::get_query_impl 10: rustc_mir::transform::check_const_item_mutation::ConstMutationChecker::is_const_item_without_destructor
commit sha c1e17f56ea1d3cc64cd7d1be6fc2557d0fd65f06
Add a regression test for issue-66501
commit sha 8631e1c57504624824add1b059d12cdc86cdd87c
Add a regression test for issue-68951
commit sha 50ffd6b7cbdf6baedbd3a22f4ea79ebdf7c48af9
Add a regression test for issue-72565
commit sha d4fdf6e7542941ab8d5b0d43f9c5bc0b278f638d
Add a regression test for issue-74244
commit sha 38f460f8669de8ee0d975ec89f06e89a5849ab65
Add a regression test for issue-75299
commit sha eef5104c53114bf9a074fe8d83cfd782bd78652d
Add test of VEC.push on a const
commit sha 75c2fdf34a5384627db9ba240c5dcc0723aea763
Warn on method call mutating const, even if it has destructor
commit sha 8164218181d8fc22a7247a686ec9af9d61f70d44
Fix some clippy issues Found while working on https://github.com/rust-lang/rust/pull/77351; these are just the ones that could be fixed automatically.
commit sha 00730fd0f1df0718f4e0f82298bff3bf1f44a98b
Auto merge of #77383 - pickfire:patch-6, r=Mark-Simulacrum Fix typo in vec doc "tries to reserves" Superseeds #77192
commit sha 8f9472cc9e372351964390bdf531cc65b13768c7
Only mention that a stack frame is being popped when starting to do so
commit sha e58f3d352d1c6f0ccc0b089754939bbcb7a2c294
Things are only moved if non-copy
commit sha fc42fb8e70af6ad63998f4bfbf62451551eda073
Auto merge of #77354 - ecstatic-morse:const-checking-moar-errors, r=oli-obk Overhaul const-checking diagnostics The primary purpose of this PR was to remove `NonConstOp::STOPS_CONST_CHECKING`, which causes any additional errors found by the const-checker to be silenced. I used this flag to preserve diagnostic parity with `qualify_min_const_fn.rs`, which has since been removed. However, simply removing the flag caused a deluge of errors in some cases, since an error would be emitted any time a local or temporary had a wrong type. To remedy this, I added an alternative system (`DiagnosticImportance`) to silence additional error messages that were likely to distract the user from the underlying issue. When an error of the highest importance occurs, all less important errors are silenced. When no error of the highest importance occurs, all less important errors are emitted after checking is complete. Following the suggestions from the important error is usually enough to fix the less important errors, so this should lead to better UX most of the time. There's also some unrelated diagnostics improvements in this PR isolated in their own commits. Splitting them out would be possible, but a bit of a pain. This isn't as tidy as some of my other PRs, but it should *only* affect diagnostics, never whether or not something passes const-checking. Note that there are a few trivial exceptions to this, like banning `Yield` in all const-contexts, not just `const fn`. As always, meant to be reviewed commit-by-commit. r? `@oli-obk`
commit sha f54bfac074657271b03f78b8847e2fbcdd1d76ad
Implement multiple return terminators optimization
commit sha f0d407ed0fe6604d44cc3fbcfba8bd1fa65f8f9c
Bless mir-opt tests with new opt
commit sha 268f786d3c188160620b81abe988f29adc6a62e6
Add test for multiple terminator optimization
commit sha 46c0bd31826e6185cf9d5876527e3d09abdf54ec
Bless mir-opt tests for 32 bit
commit sha 9cba260df0f1c67ea3690035cd5611a7465a1560
Auto merge of #74839 - alarsyo:multiple_return_terminators, r=oli-obk Implement multiple return terminator optimization Closes #72022
commit sha df76cf89add1454f2ec2f11810120b90367b6921
BTreeMap: admit the existence of leaf edges in comments
commit sha 225ec813a9b25cdf94811d5b6c5207848cfef829
Add a cross-compiling aarch64-apple-darwin CI builder
push time in 13 days
push eventjackh726/rust
commit sha 9e2ebf31ddb83ed3dd22ae16a5120d1178a7d370
Rollup merge of #76868 - poliorcetics:intra-doc-std-sync, r=jyn514 Finish moving to intra doc links for std::sync Helps with #75080. @rustbot modify labels: T-doc A-intra-doc-links r? @jyn514
commit sha 02d787bef8b6b12523253cf24f79df5c1428959c
Rollup merge of #76872 - khyperia:remove_declare_methods, r=eddyb Remove DeclareMethods Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them. (`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
commit sha b670b86353ac42b98a969de6f804f9718a56097d
Rollup merge of #76936 - danielhenrymantilla:unsafecell_get_mut, r=RalfJung Add non-`unsafe` `.get_mut()` for `Unsafecell` - Tracking issue: https://github.com/rust-lang/rust/issues/76943 As discussed in: https://internals.rust-lang.org/t/add-non-unsafe-get-mut-for-unsafecell/12407 - ### [Rendered documentation](https://modest-dubinsky-1f9f47.netlify.app/core/cell/struct.unsafecell) This PR tries to move the sound `&mut UnsafeCell<T> -> &mut T` projection that all the "downstream" constructions were already relying on, up to the root abstraction, where it rightfully belongs, and officially blessing it. - this **helps reduce the amount of `unsafe` snippets out there** (_c.f._, the second commit of this PR: https://github.com/rust-lang/rust/pull/76936/commits/09503fd1b30c83ca605546fa3f899721e41e68c6) The fact that this getter is now expose for `UnsafeCell<T>` itself, will also help convey the idea that **`UnsafeCell` is not magical _w.r.t._ `&mut` accesses**, contrary to what some people incorrectly think. - Even the standard library itself at some point had such a confusion, _c.f._ this comment where there is a mention of multi-threaded (and thus _shared_) access despite dealing with exclusive references over unique ownership: https://github.com/rust-lang/rust/blob/59fb88d061544a035f3043b47594b34789204cee/library/core/src/cell.rs#L498-L499 r? @RalfJung
commit sha 048866bd6b74ef34a8a2e1a3e89f9617834a5d05
Rollup merge of #76958 - est31:ns, r=oli-obk Replace manual as_nanos and as_secs_f64 reimplementations
commit sha f957aeef9f3141e93fda5a91851fa9c24cce6b69
Rollup merge of #76959 - est31:write, r=oli-obk Replace write_fmt with write! Latter is simpler
commit sha 5760b081a6a14dceafd00663757c895c71196449
Rollup merge of #76961 - bugadani:test-34634, r=Mark-Simulacrum Add test for issue #34634 Closes #34634
commit sha 9aba4962f5ee7fb215480809f4aeb241de6deba3
Rollup merge of #76962 - est31:const_cstr, r=oli-obk Use const_cstr macro in consts.rs
commit sha e177757a046ea5d667495181b8f5968bae71cfb6
Rollup merge of #76963 - est31:remove_static_assert, r=oli-obk Remove unused static_assert macro
commit sha d337074d0992533c02e077c562fc3ea279bd165c
Rollup merge of #77000 - RalfJung:miri, r=RalfJung update Miri I'd like to get https://github.com/rust-lang/miri/pull/1556 out there to avoid some backwards-incompatible changes. r? @ghost Cc @rust-lang/miri
commit sha c160bf3c3ef4434d76cc4d093b34e9bb1fdab2a1
Cache `eval_to_allocation_raw` on disk
commit sha 39245400c53db98b2c4cb90cf712b282d8425d66
fix InterpCx resolve
commit sha 9172e277f864205daaf8fde64868d833cc6e7eb2
Dogfood total_cmp in the test crate
commit sha 956e06c6c85e918524b67503c4d65c7baf539585
Auto merge of #77004 - RalfJung:rollup-usac4nv, r=RalfJung Rollup of 13 pull requests Successful merges: - #76135 (Stabilize some Option methods as const) - #76628 (Add sample defaults for config.toml ) - #76846 (Avoiding unnecesary allocations at rustc_errors) - #76867 (Use intra-doc links in core/src/iter when possible) - #76868 (Finish moving to intra doc links for std::sync) - #76872 (Remove DeclareMethods) - #76936 (Add non-`unsafe` `.get_mut()` for `Unsafecell`) - #76958 (Replace manual as_nanos and as_secs_f64 reimplementations) - #76959 (Replace write_fmt with write!) - #76961 (Add test for issue #34634) - #76962 (Use const_cstr macro in consts.rs) - #76963 (Remove unused static_assert macro) - #77000 (update Miri) Failed merges: r? `@ghost`
commit sha 073127a04fda615fe865808add119f96a241ec91
check for cycles when unifying const variables
commit sha 2855b92eb4fcc32d940de71dfd5eb383eaecc872
add tests
commit sha f95e4f3ca9860bfef68ca279017db8c035966dbe
Improve code and documentation clarity
commit sha be3d8e5d6cc6833963c00404ec48a7f8f4a0c606
Add missing code examples on HashMap types
commit sha 60b102de06f52102aa6c343de1f1ef31ff08f8df
Don't recommend ManuallyDrop to customize drop order See https://internals.rust-lang.org/t/need-for-controlling-drop-order-of-fields/12914/21 for the discussion. TL;DR: ManuallyDrop is unsafe and footguny, but you can just ask the compiler to do all the work for you by re-ordering declarations.
commit sha f7eceef653c791ee9f5eef7728c50295d6808e14
Document future incompat lints
commit sha e0bf356f9e5f6a8cca1eb656e900ffba79340fa1
Auto merge of #74040 - lcnr:const-occurs-check, r=nikomatsakis fix unification of const variables r? `@nikomatsakis` `@varkor` `@eddyb` let's just ping everyone here :sweat_smile:
push time in 14 days