profile
viewpoint
varkor varkor https://varkor.github.io/blog/ Type theorist and Rust compiler developer.

varkor/DISTORT 3

A small game demonstrating a grid distortion effect

varkor/Epilog 3

A toy Prolog compiler

ocrawford555/teamOscarSSE 2

Simulated Stock Exchange for Part IB Group Project

varkor/blog 1

A small blog about type theory and mathematics

varkor/chalk 1

A PROLOG-ish interpreter written in Rust, intended eventually for use in the compiler

varkor/acs-category-theory-notes-2017 0

Cambridge ACS Category Theory, Type Theory, and Logic - lecture notes 2017.

varkor/bitflags 0

A macro to generate structures which behave like bitflags

varkor/book 0

The Rust Programming Language

pull request commentrust-lang/rust

Clean up diagnostics for arithmetic operation errors

I addressed the fulldeps, but unfortunately I couldn't run the entire test suite on my computer (it's been acting up lately), so I'm not certain there isn't another issue. Hopefully that's the last of them.

@bors r=ecstatic-morse

varkor

comment created time in 4 minutes

push eventvarkor/rust

varkor

commit sha c0b105780e2534ebe1337f529d878dab75e3636f

Fix run-make-fulldeps tests

view details

push time in 2 hours

issue commentrust-lang/rust

Equality constraints on associated constants

I believe only (some of) the parsing aspects were addressed, and nothing more. There is still implementation left before this feature is even ready for a feature gate.

Centril

comment created time in a day

pull request commentrust-lang/rust

expand: Stop normalizing `NtIdent`s before passing them to built-in macros

@bors r+ rollup

petrochenkov

comment created time in a day

pull request commentrust-lang/rust

Clean up diagnostics for arithmetic operation errors

@bors r=ecstatic-morse

varkor

comment created time in 2 days

push eventvarkor/rust

varkor

commit sha 5851d624ae6b4f3769a01a4196a1a55f44e8c649

Fix UI test fallout

view details

push time in 2 days

push eventvarkor/rust

Marcel Hellwig

commit sha 00d537dcd03f9ff5ebdf8b86e039dbdb0a7f850c

deny(unsafe_op_in_unsafe_fn) in libstd/path.rs

view details

Ivan Tham

commit sha c5975e9b6c5781b3b7300b7921c14b060086e1c1

Reduce duplicate in liballoc reserve error handling

view details

Vali Schneider

commit sha 459969f88ff95c94b7b34043a7f0e13de91de4f8

added restriction lint that prohibits the usage of unimplemented, unreachable or panic in a function of type result or option

view details

Vali Schneider

commit sha ceab1a9167655eba9f9556f8766f8702e49dfef3

removed unnecessary comment

view details

Vali Schneider

commit sha 8462cce96081b87eba7a5bc89130a1a09fe1f6d0

edited documentation

view details

Vali Schneider

commit sha b2d8ca9a766703469178ea37d4d46067bb6fa926

ran cargo dev update lints

view details

Vali Schneider

commit sha b006522393a3c3c2656e1ccdfbb0076ff1bd7e99

added lint for todo and removed option

view details

Vali Schneider

commit sha a424a2c1676a29c147252873037e8943d54941d3

changed check_impl_item to check_fn and added a few more test cases

view details

Vali Schneider

commit sha 73a3288282e733bfc5893e9920d29f1de5a21591

uncommented fn

view details

Federico Ponzi

commit sha 27c90b881df93b53fd3f24dcbfed116379c2fc69

initial implementation of OpenOptions to c_int

view details

Federico Ponzi

commit sha eb3906be4ad375cc6b83cd6a6e0116817db22575

Fix typo get openoptions function name Co-authored-by: Ivan Tham <pickfire@riseup.net>

view details

David Wood

commit sha 0f2bd56b29857453835e47abbe96a80b175632d1

lint/ty: move fns to avoid abstraction violation This commit moves `transparent_newtype_field` and `is_zst` to `LateContext` where they are used, rather than being on the `VariantDef` and `TyS` types. Signed-off-by: David Wood <david@davidtw.co>

view details

Erik Desjardins

commit sha d3b9ece4c0028ff7e36e34df2d2b26366f9c0648

add tests related to tuple scalar layout with ZST in last field

view details

Erik Desjardins

commit sha e5d85f917b8965a5e62513c17cbb887366b152bc

allow reordering of the last field of a MaybeUnsized struct if it's a ZST

view details

Erik Desjardins

commit sha e9bc3ddb073f2261ac46832d985efe8db863ed6a

test that we do not change the offset of ZST tuple fields when unsizing

view details

Erik Desjardins

commit sha 68217c9e0f1269d29b4c1c72d08fb1b95bf441cd

ignore zst offsets instead

view details

Erik Desjardins

commit sha 6fc1d8bc13124bb134d7ab54e56237821a55912e

add codegen test

view details

Erik Desjardins

commit sha 24e0913e37cc6fc363b37d13bf519db212f175a2

handle vector layout

view details

CDirkx

commit sha 518f1ccb728aa03665e51710c12973a74cc98df5

Stabilize some Result methods as const Stabilize the following methods of `Result` as const: - `is_ok` - `is_err` - `as_ref` Possible because of stabilization of #49146 (Allow if and match in constants).

view details

Federico Ponzi

commit sha 1bc0627607262cc60a7692b16e205f30fc88b89f

Add as_flag function to the OpenOptionsExt struct

view details

push time in 2 days

issue closedrust-lang/rust

Consolidate generic "parameter" versus "argument" distinction

There's currently an internal distinction in the terminology for generic parameters (the variables in a type signature) and generic arguments (the actual values for those variables that is passed in).

For example:

fn foo<'a, B, const C: usize>(); // `'a`, `B`, `C` are generic parameters

foo::<'static, usize, 0>(); // `'static`, `usize`, `0` are generic arguments

This terminology is used inconsistently in user-facing strings, like error messages. For example, E0087 has text such as expected at most 0 type parameters, found 1 type parameter (when they're actually arguments), whereas E0244 (wrong number of type arguments) uses the correct terminology.

Currently "parameter" is often used instead of "argument", but it would be nice to make this consistent.

closed time in 2 days

varkor

issue commentrust-lang/rust

Consolidate generic "parameter" versus "argument" distinction

@mightyiam: the diagnostics messages appear in most of the compiler/ subdirectories. However, I'm not sure of specific examples where this parameter/argument distinction is incorrect now: I think this issue has slowly been addressed since it was opened. If you can find any more incorrect examples, then you'd be very welcome to open a pull request correcting them, but it may be a wild goose chase. I'm going to close this issue accordingly, but we can reopen if mistakes are found.

varkor

comment created time in 2 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded {     } } +/// Information about a constant or a type containing inference variables.+pub struct InferDiagnosticsData {+    pub name: String,+    pub span: Option<Span>,+    pub description: Cow<'static, str>,+    pub parent_name: Option<String>,+    pub parent_description: Option<&'static str>,+}+ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {-    pub fn extract_type_name(+    /// Extracts data used by diagnostic for either types or constants+    /// which were stuck during inference.+    pub fn extract_infer_data(

Maybe extract_inference_diagnostics_data?

lcnr

comment created time in 3 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded {     } } +/// Information about a constant or a type containing inference variables.+pub struct InferDiagnosticsData {

I slightly prefer InferenceDiagnosticsData, but I don't have a strong preference.

lcnr

comment created time in 3 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded {     } } +/// Information about a constant or a type containing inference variables.+pub struct InferDiagnosticsData {+    pub name: String,+    pub span: Option<Span>,+    pub description: Cow<'static, str>,+    pub parent_name: Option<String>,+    pub parent_description: Option<&'static str>,+}+ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {-    pub fn extract_type_name(+    /// Extracts data used by diagnostic for either types or constants+    /// which were stuck during inference.+    pub fn extract_infer_data(         &self,-        ty: Ty<'tcx>,+        arg: GenericArg<'tcx>,         highlight: Option<ty::print::RegionHighlightMode>,-    ) -> (String, Option<Span>, Cow<'static, str>, Option<String>, Option<&'static str>) {-        if let ty::Infer(ty::TyVar(ty_vid)) = *ty.kind() {-            let mut inner = self.inner.borrow_mut();-            let ty_vars = &inner.type_variables();-            let var_origin = ty_vars.var_origin(ty_vid);-            if let TypeVariableOriginKind::TypeParameterDefinition(name, def_id) = var_origin.kind {-                let parent_def_id = def_id.and_then(|def_id| self.tcx.parent(def_id));-                let (parent_name, parent_desc) = if let Some(parent_def_id) = parent_def_id {-                    let parent_name = self-                        .tcx-                        .def_key(parent_def_id)-                        .disambiguated_data-                        .data-                        .get_opt_name()-                        .map(|parent_symbol| parent_symbol.to_string());--                    (parent_name, Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)))-                } else {-                    (None, None)-                };+    ) -> InferDiagnosticsData {+        match arg.unpack() {+            GenericArgKind::Type(ty) => {+                if let ty::Infer(ty::TyVar(ty_vid)) = *ty.kind() {+                    let mut inner = self.inner.borrow_mut();+                    let ty_vars = &inner.type_variables();+                    let var_origin = ty_vars.var_origin(ty_vid);+                    if let TypeVariableOriginKind::TypeParameterDefinition(name, def_id) =+                        var_origin.kind+                    {+                        let parent_def_id = def_id.and_then(|def_id| self.tcx.parent(def_id));+                        let (parent_name, parent_description) =+                            if let Some(parent_def_id) = parent_def_id {+                                let parent_name = self+                                    .tcx+                                    .def_key(parent_def_id)+                                    .disambiguated_data+                                    .data+                                    .get_opt_name()+                                    .map(|parent_symbol| parent_symbol.to_string());++                                (+                                    parent_name,+                                    Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)),+                                )+                            } else {+                                (None, None)+                            };++                        if name != kw::SelfUpper {+                            return InferDiagnosticsData {+                                name: name.to_string(),+                                span: Some(var_origin.span),+                                description: "type parameter".into(),+                                parent_name,+                                parent_description,+                            };+                        }+                    }+                } -                if name != kw::SelfUpper {-                    return (-                        name.to_string(),-                        Some(var_origin.span),-                        "type parameter".into(),-                        parent_name,-                        parent_desc,-                    );+                let mut s = String::new();+                let mut printer = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS);+                if let Some(highlight) = highlight {+                    printer.region_highlight_mode = highlight;+                }+                let _ = ty.print(printer);+                InferDiagnosticsData {+                    name: s,+                    span: None,+                    description: ty.prefix_string(),+                    parent_name: None,+                    parent_description: None,                 }             }-        }+            GenericArgKind::Const(ct) => {+                if let ty::ConstKind::Infer(InferConst::Var(vid)) = ct.val {+                    let origin =+                        self.inner.borrow_mut().const_unification_table().probe_value(vid).origin;+                    if let ConstVariableOriginKind::ConstParameterDefinition(name, def_id) =+                        origin.kind+                    {+                        let parent_def_id = self.tcx.parent(def_id);+                        let (parent_name, parent_description) =+                            if let Some(parent_def_id) = parent_def_id {+                                let parent_name = self+                                    .tcx+                                    .def_key(parent_def_id)+                                    .disambiguated_data+                                    .data+                                    .get_opt_name()+                                    .map(|parent_symbol| parent_symbol.to_string());++                                (+                                    parent_name,+                                    Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)),+                                )+                            } else {+                                (None, None)+                            };++                        return InferDiagnosticsData {+                            name: name.to_string(),+                            span: Some(origin.span),+                            description: "const parameter".into(),+                            parent_name,+                            parent_description,+                        };+                    } -        let mut s = String::new();-        let mut printer = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS);-        if let Some(highlight) = highlight {-            printer.region_highlight_mode = highlight;+                    debug_assert!(!origin.span.is_dummy());+                    let mut s = String::new();+                    let mut printer =+                        ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::ValueNS);+                    if let Some(highlight) = highlight {+                        printer.region_highlight_mode = highlight;+                    }+                    let _ = ct.print(printer);+                    InferDiagnosticsData {+                        name: s,+                        span: Some(origin.span),+                        description: "the constant".into(),+                        parent_name: None,+                        parent_description: None,+                    }+                } else {+                    bug!("unexpect const: {:?}", ct);+                }+            }+            GenericArgKind::Lifetime(_) => bug!("unexpected lifetime"),         }-        let _ = ty.print(printer);-        (s, None, ty.prefix_string(), None, None)     } -    // FIXME(eddyb) generalize all of this to handle `ty::Const` inference variables as well.     pub fn need_type_info_err(         &self,         body_id: Option<hir::BodyId>,         span: Span,-        ty: Ty<'tcx>,+        arg: GenericArg<'tcx>,         error_code: TypeAnnotationNeeded,     ) -> DiagnosticBuilder<'tcx> {-        let ty = self.resolve_vars_if_possible(&ty);-        let (name, name_sp, descr, parent_name, parent_descr) = self.extract_type_name(&ty, None);+        let ty = self.resolve_vars_if_possible(&arg);

This is no longer necessarily a type.

lcnr

comment created time in 3 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded {     } } +/// Information about a constant or a type containing inference variables.+pub struct InferDiagnosticsData {+    pub name: String,+    pub span: Option<Span>,+    pub description: Cow<'static, str>,+    pub parent_name: Option<String>,+    pub parent_description: Option<&'static str>,+}+ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {-    pub fn extract_type_name(+    /// Extracts data used by diagnostic for either types or constants+    /// which were stuck during inference.+    pub fn extract_infer_data(         &self,-        ty: Ty<'tcx>,+        arg: GenericArg<'tcx>,         highlight: Option<ty::print::RegionHighlightMode>,-    ) -> (String, Option<Span>, Cow<'static, str>, Option<String>, Option<&'static str>) {-        if let ty::Infer(ty::TyVar(ty_vid)) = *ty.kind() {-            let mut inner = self.inner.borrow_mut();-            let ty_vars = &inner.type_variables();-            let var_origin = ty_vars.var_origin(ty_vid);-            if let TypeVariableOriginKind::TypeParameterDefinition(name, def_id) = var_origin.kind {-                let parent_def_id = def_id.and_then(|def_id| self.tcx.parent(def_id));-                let (parent_name, parent_desc) = if let Some(parent_def_id) = parent_def_id {-                    let parent_name = self-                        .tcx-                        .def_key(parent_def_id)-                        .disambiguated_data-                        .data-                        .get_opt_name()-                        .map(|parent_symbol| parent_symbol.to_string());--                    (parent_name, Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)))-                } else {-                    (None, None)-                };+    ) -> InferDiagnosticsData {+        match arg.unpack() {+            GenericArgKind::Type(ty) => {+                if let ty::Infer(ty::TyVar(ty_vid)) = *ty.kind() {+                    let mut inner = self.inner.borrow_mut();+                    let ty_vars = &inner.type_variables();+                    let var_origin = ty_vars.var_origin(ty_vid);+                    if let TypeVariableOriginKind::TypeParameterDefinition(name, def_id) =+                        var_origin.kind+                    {+                        let parent_def_id = def_id.and_then(|def_id| self.tcx.parent(def_id));+                        let (parent_name, parent_description) =+                            if let Some(parent_def_id) = parent_def_id {+                                let parent_name = self+                                    .tcx+                                    .def_key(parent_def_id)+                                    .disambiguated_data+                                    .data+                                    .get_opt_name()+                                    .map(|parent_symbol| parent_symbol.to_string());++                                (+                                    parent_name,+                                    Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)),+                                )+                            } else {+                                (None, None)+                            };++                        if name != kw::SelfUpper {+                            return InferDiagnosticsData {+                                name: name.to_string(),+                                span: Some(var_origin.span),+                                description: "type parameter".into(),+                                parent_name,+                                parent_description,+                            };+                        }+                    }+                } -                if name != kw::SelfUpper {-                    return (-                        name.to_string(),-                        Some(var_origin.span),-                        "type parameter".into(),-                        parent_name,-                        parent_desc,-                    );+                let mut s = String::new();+                let mut printer = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS);+                if let Some(highlight) = highlight {+                    printer.region_highlight_mode = highlight;+                }+                let _ = ty.print(printer);+                InferDiagnosticsData {+                    name: s,+                    span: None,+                    description: ty.prefix_string(),+                    parent_name: None,+                    parent_description: None,                 }             }-        }+            GenericArgKind::Const(ct) => {+                if let ty::ConstKind::Infer(InferConst::Var(vid)) = ct.val {+                    let origin =+                        self.inner.borrow_mut().const_unification_table().probe_value(vid).origin;+                    if let ConstVariableOriginKind::ConstParameterDefinition(name, def_id) =+                        origin.kind+                    {+                        let parent_def_id = self.tcx.parent(def_id);+                        let (parent_name, parent_description) =+                            if let Some(parent_def_id) = parent_def_id {+                                let parent_name = self+                                    .tcx+                                    .def_key(parent_def_id)+                                    .disambiguated_data+                                    .data+                                    .get_opt_name()+                                    .map(|parent_symbol| parent_symbol.to_string());++                                (+                                    parent_name,+                                    Some(self.tcx.def_kind(parent_def_id).descr(parent_def_id)),+                                )+                            } else {+                                (None, None)+                            };++                        return InferDiagnosticsData {+                            name: name.to_string(),+                            span: Some(origin.span),+                            description: "const parameter".into(),+                            parent_name,+                            parent_description,+                        };+                    } -        let mut s = String::new();-        let mut printer = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS);-        if let Some(highlight) = highlight {-            printer.region_highlight_mode = highlight;+                    debug_assert!(!origin.span.is_dummy());+                    let mut s = String::new();+                    let mut printer =+                        ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::ValueNS);+                    if let Some(highlight) = highlight {+                        printer.region_highlight_mode = highlight;+                    }+                    let _ = ct.print(printer);+                    InferDiagnosticsData {+                        name: s,+                        span: Some(origin.span),+                        description: "the constant".into(),+                        parent_name: None,+                        parent_description: None,+                    }+                } else {+                    bug!("unexpect const: {:?}", ct);+                }+            }+            GenericArgKind::Lifetime(_) => bug!("unexpected lifetime"),         }-        let _ = ty.print(printer);-        (s, None, ty.prefix_string(), None, None)     } -    // FIXME(eddyb) generalize all of this to handle `ty::Const` inference variables as well.     pub fn need_type_info_err(

Maybe something like emit_inference_failure_err?

lcnr

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentrust-lang/rust

Allow multiple allow_internal_unstable attributes

Thanks!

@bors r+ rollup

bugadani

comment created time in 3 days

Pull request review commentrust-lang/rust

Allow multiple allow_internal_unstable attributes

 pub fn find_transparency(  pub fn allow_internal_unstable<'a>(     sess: &'a Session,-    attrs: &[Attribute],+    attrs: &'a [Attribute], ) -> Option<impl Iterator<Item = Symbol> + 'a> {-    let attr = sess.find_by_name(attrs, sym::allow_internal_unstable)?;-    let list = attr.meta_item_list().or_else(|| {-        sess.diagnostic()-            .span_err(attr.span, "allow_internal_unstable expects list of feature names");-        None-    })?;+    let attrs = sess.filter_by_name(attrs, sym::allow_internal_unstable);+    let list = attrs+        .filter_map(move |attr| {+            attr.meta_item_list().or_else(|| {+                sess.diagnostic()+                    .span_err(attr.span, "allow_internal_unstable expects list of feature names");
                    .span_err(attr.span, "`allow_internal_unstable` expects a list of feature names");
bugadani

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventvarkor/quiver

varkor

commit sha b3de55c40be0df92525b3bf9df046aec918edd7d

Rebuild GitHub Pages

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha e3ee4a99e7289150adcb148293cbd2c484188df2

Use the endpoints, rather than the source and target, for curve midpoint calculation

view details

varkor

commit sha 17701fb9ccf2c1a7b77a226fec4357b886576e1a

Improve the edge connection validity check

view details

varkor

commit sha 7e62c1c877ace951087c669c8a2b36c5e260ce5f

Fix edge centre in place when edge is not visible

view details

varkor

commit sha ff28b70a324d38f7fb6264ea715852fdd84c3e81

Build dependencies

view details

varkor

commit sha 7c77f0ef6d04d341fb38dbda746f8ed618f55b3b

Add the dev branch

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 5e348c8939891a703e1eb5ab24538078d9cbd1f1

Fix edge centre in place when edge is not visible

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 2a78891392a97ebad723e8e2d46647685a62be01

Improve the edge connection validity check

view details

push time in 4 days

issue closedvarkor/quiver

Correct label position on edges

At the moment, label position (and the centre of an edge) are calculated with respect to the source and target. They should instead be calculated with respect to the endpoints. Otherwise, we get situations like below. image

closed time in 4 days

varkor

issue commentvarkor/quiver

Correct label position on edges

Fixed in https://github.com/varkor/quiver/commit/00f379d6a14b97220b5a5cd7258b828cff30848c.

varkor

comment created time in 4 days

push eventvarkor/quiver

varkor

commit sha 00f379d6a14b97220b5a5cd7258b828cff30848c

Use the endpoints, rather than the source and target, for curve midpoint calculation

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha f839c4bbfb06a757b383f3280f42c029d31b3c77

Rebuild GitHub Pages

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 1b35c0ef791f49fe89ae833dbc30555f5e407deb

Fix exporting links with macros

view details

varkor

commit sha e84c2eb783b27fd190cd013a652531af361d3ffc

Build dependencies

view details

varkor

commit sha 98938661a8644cb8b4a1e801cc1512db1aebca09

Add the dev branch

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 322afad52dd6ce74bdf7a60c7c6e47f8a92e75b0

Fix exporting links with macros

view details

push time in 4 days

issue openedvarkor/quiver

Correct label position on edges

At the moment, label position (and the centre of an edge) are calculated with respect to the source and target. They should instead be calculated with respect to the endpoints. Otherwise, we get situations like below. image

created time in 4 days

push eventvarkor/quiver

varkor

commit sha 76537f03355688f28c487cc0e4fe89fe939f8819

Rebuild GitHub Pages

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 9e43c5911d56121e4dc8bc2dabf3f54dedd0fdf1

Fix label rendering bug in Firefox

view details

varkor

commit sha d2207f434e8ef833cc7d60e1c8ce77e5304c8a72

Build dependencies

view details

varkor

commit sha 41400277c9e95b398231df0fe8ec7ff9ea9cef3b

Add the dev branch

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 545b93080629a87ab5b89c35282933ab4cf079a7

Fix label rendering bug in Firefox

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 54d7d46ab6615fb04f0bd6dd759fd192407ceecd

Rebuild GitHub Pages

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 742ca0ea3112c83ecfc5619ab3510cb4b786e0d4

Fix bug with resizing vertex labels

view details

varkor

commit sha 1c399038f35bf3093d85ed732add64ffd2c4f20a

Build dependencies

view details

varkor

commit sha f4033ff75dfa4ccb26d60b5eb5b0e201c5013273

Add the dev branch

view details

push time in 4 days

push eventvarkor/quiver

varkor

commit sha 8fb580558f9412c5c38d2f19c7cbc80a9456579e

Fix bug with resizing vertex labels

view details

push time in 4 days

PR closed rust-lang/rust

Reviewers
Stability annotations on generic parameters (take 2) S-waiting-on-author

This is a followup of #65083 as an implementation of https://github.com/rust-lang/wg-allocators/issues/2. It's the same logic, but in one commit (to avoid rebasing). It does not contain all of @varkor's clarifying comments and typo fixes.

This is still WIP, I'll summarize what works and followup on https://github.com/rust-lang/rust/pull/65083#issuecomment-623454469 soon.

+634 -32

38 comments

9 changed files

Avi-D-coder

pr closed time in 5 days

pull request commentrust-lang/rust

Stability annotations on generic parameters (take 2)

Closing in favour of https://github.com/rust-lang/rust/pull/77118.

Avi-D-coder

comment created time in 5 days

pull request commentrust-lang/rust

Stability annotations on generic parameters (take 2.5)

Thanks to @Avi-D-coder for all their hard work implementing this feature!

exrook

comment created time in 5 days

pull request commentrust-lang/rust

Stability annotations on generic parameters (take 2.5)

Thanks for taking this across the finish line!

@bors r+

exrook

comment created time in 5 days

pull request commentrust-lang/rust

Stability annotations on generic parameters (take 2)

@exrook: thanks, that looks great! If you open up a new pull request with those changes, I can approve that one (as @Avi-D-coder seems busy at the moment): the authors are tracked in the commits, so it doesn't matter so much which PR is merged.

Avi-D-coder

comment created time in 5 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl<'a, 'tcx> InferCtxt<'a, 'tcx> {             "type inside {} must be known in this context",             kind,         );-        err.span_label(span, InferCtxt::missing_type_msg(&name, &descr, parent_name, parent_descr));+        err.span_label(+            span,+            InferCtxt::missing_type_msg("type", &name, &descr, parent_name, parent_descr),+        );         err     }      fn missing_type_msg(

This should be renamed too.

lcnr

comment created time in 5 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

+error[E0282]: type annotations needed+  --> $DIR/issue-77092.rs:13:26+   |+LL |         println!("{:?}", take_array_from_mut(&mut arr, i));+   |                          ^^^^^^^^^^^^^^^^^^^ cannot infer the value of the constant `{_: usize}`

Would it make more sense here to use a similar message to below? E.g.

cannot infer the value of const parameter `N`
lcnr

comment created time in 5 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded { impl<'a, 'tcx> InferCtxt<'a, 'tcx> {     pub fn extract_type_name(

This should be renamed, if it's no longer just for types.

lcnr

comment created time in 5 days

Pull request review commentrust-lang/rust

merge `need_type_info_err(_const)`

 impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded { impl<'a, 'tcx> InferCtxt<'a, 'tcx> {     pub fn extract_type_name(         &self,-        ty: Ty<'tcx>,+        arg: GenericArg<'tcx>,         highlight: Option<ty::print::RegionHighlightMode>,     ) -> (String, Option<Span>, Cow<'static, str>, Option<String>, Option<&'static str>) {

I know this is a pre-existing issue, but could you extract this result value into a struct? It's not possible to guess what these components mean from the signature.

lcnr

comment created time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventvarkor/quiver

varkor

commit sha c1d680812ceefde3630498ae20dc4847ad5fa561

Rebuild GitHub Pages

view details

push time in 5 days

push eventvarkor/quiver

varkor

commit sha f7f38637ac1131beb902066a8c37e067a2e31bb7

Build dependencies

view details

varkor

commit sha e9f273af5e8d7977684aa3de97ce96c95523f778

Add the dev branch

view details

push time in 5 days

push eventvarkor/quiver

varkor

commit sha 1af70758bb0cfc72a993162c13ae311b3fc8a26a

Rebuild GitHub Pages

view details

push time in 6 days

push eventvarkor/quiver

varkor

commit sha 6d5d875d433a0d832a94634b4bc79e708cd20764

Use `DOM` library throughout

view details

varkor

commit sha fe18a0fc24c13074e68edcaad12215583f4e717b

Add an option to control the length of an arrow

view details

varkor

commit sha 89dba2a453ba01092debab96f92e52a068392e10

Build dependencies

view details

varkor

commit sha 14cd647a1fdb0ef7885334592ca45ce083cc1c9c

Add the dev branch

view details

push time in 6 days

issue closedvarkor/quiver

Changing arrow lengths

Would it be possible to have a slider to change arrow lengths? This could be achieved using the tikzcd shorten option, and is very useful for the 2-arrows in pasting diagrams.

closed time in 6 days

vikraman

issue commentvarkor/quiver

Changing arrow lengths

This was added in https://github.com/varkor/quiver/commit/1fa8e4ab56626ff00f97c72637fa2a0cb6318fed. The tikz-cd output isn't yet so good for curved arrows, because shorten doesn't work properly there, but it works well for the original use case (shortening 2-cells).

vikraman

comment created time in 6 days

push eventvarkor/quiver

varkor

commit sha 1fa8e4ab56626ff00f97c72637fa2a0cb6318fed

Add an option to control the length of an arrow

view details

push time in 6 days

pull request commentrust-lang/rust

Reduce boilerplate with the matches! macro

These all seem like improvements to me. I'll wait a while to see if anyone else has an opinion, but otherwise it looks good.

LingMan

comment created time in 7 days

push eventvarkor/rfcs

varkor

commit sha 9daec615ce20617c0963dc50ecedf03caebc2502

Fix another typo Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>

view details

push time in 7 days

pull request commentrust-lang/rfcs

Enum variant types

@jugglerchris: if you send me a message on Zulip, I can give you some pointers for how to get started!

varkor

comment created time in 8 days

push eventvarkor/rust

varkor

commit sha 567151a7c9f53ccd06a5508b032f963726f0392c

Normalise `BITS` in UI test

view details

push time in 8 days

push eventvarkor/quiver

varkor

commit sha 83ef96960e99dd9745ff62b88cd90de774f1f370

Use `DOM` library throughout

view details

push time in 9 days

issue commentvarkor/quiver

Changing arrow lengths

The difficulty with this feature is that shorten in TikZ does not behave well for curved arrows (see this TeX.SE answer, for instance). I'd rather implement a version that works well in any situation, but I need to investigate if that's even possible.

The arrow library in quiver already has the ability to shorten.

vikraman

comment created time in 9 days

push eventvarkor/quiver

varkor

commit sha 5b0cceab55943d2d810df74019b60a10ab91d1bf

Use `DOM` library throughout

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha 69d29dc2e01bc49d041051b587f249832edf8e96

Rebuild GitHub Pages

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha bff32e2f44b3923683c8ca6ff66f938da854d171

Limit to 3-cells

view details

varkor

commit sha 8511c797b339882f99bc76578ba99cd52d2d3415

Take offset into account for higher cells

view details

varkor

commit sha f1e5af42d98cbeb10ba19dfe05e08f6690487810

Fix issue with reconnecting cell to new vertex

view details

varkor

commit sha 0421aab309d9b3234097762b1ae612165921cef7

Build dependencies

view details

varkor

commit sha f904c94a793b4cbefaf87f6ac6df986606b25796

Add the dev branch

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha df53f4ea949173a385381a79b7781cb9bb8b2bb5

Fix issue with reconnecting cell to new vertex

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha 5361d9b74ab1196de87fecaee846e7d3eced9e92

Take offset into account for higher cells

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha 569b39aa0343c37333dcdb16352cf312afc348e9

Limit to 3-cells

view details

push time in 9 days

pull request commentrust-lang/rust

Split `core/num/mod.rs` to smaller mods

@lzutao: could you rebase once more? I'll increase the priority of the PR, so it shouldn't happen again.

@bors p=100

lzutao

comment created time in 9 days

push eventvarkor/quiver

varkor

commit sha ce8a5fb4864706637b102c1bb27b781a7b201944

Rebuild GitHub Pages

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha 496e9806303ab43f8c99e7ddb9cd374e8289ea14

Increase maximum cell level to 3

view details

varkor

commit sha 96285058cf16e7012ebd00b6948560c87b7c40a3

Fix an issue with releasing the pointer after dragging over the side panel

view details

varkor

commit sha d246dcdde1509bbbab77cbd23cdf540ecca85d97

Fix issue with releasing a drag over a grid line

view details

varkor

commit sha cdebc0a5c19daaf7e31290ce0895ecf317fe607a

Fix bug with insertion point moving before placing vertex

view details

varkor

commit sha 92b3251b20924014135e90a02be98d8f60ee7259

Build dependencies

view details

varkor

commit sha 3e29a8a55f19986802d3d27850a576a97f11b960

Add the dev branch

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha e44084e143727dbead897793bc2b2e89adfd0252

Fix bug with insertion point moving before placing vertex

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha f16d846fc5bb25aa68af76d18e7934356bb77f34

Fix issue with releasing a drag over a grid line

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha f59420a73e597a6f43aa5e443606b95be9a705e7

Fix an issue with releasing the pointer after dragging over the side panel

view details

push time in 9 days

push eventvarkor/quiver

varkor

commit sha 8dc2bfc3589e8134a58c4aa6d25dbd4be7e3730f

Increase maximum cell level to 3

view details

push time in 9 days

pull request commentrust-lang/rust

Split `core/num/mod.rs` to smaller mods

@rust-lang/libs: is there someone who could review this PR? It bitrots quite quickly.

lzutao

comment created time in 9 days

issue commentvarkor/quiver

Curved arrows

You can try curved arrows out on the development version: https://varkor.github.io/quiver/dev/. I'll push it to the main site once I've ironed out any bugs that pop up.

varkor

comment created time in 10 days

push eventvarkor/quiver

varkor

commit sha 17416dbaad09b8106d6fd7146c1772ba3e03dfac

Rebuild GitHub Pages

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha 44e80d3cd7d36643b205940271c5ea05b0972883

Implement curved arrows I wrote a new arrow rendering library from scratch. It significantly improves upon the previous library, and as a happy consequence there are improvements to the user experience too.

view details

varkor

commit sha 5cb325f6c6e4b4249f11daa1306ad29fd47daa07

Build dependencies

view details

varkor

commit sha aef71d64e77f979d556eed764cc85c996a075a07

Add the dev branch

view details

push time in 10 days

create barnchvarkor/quiver

branch : arrow

created branch time in 10 days

delete branch varkor/quiver

delete branch : arrow

delete time in 10 days

push eventvarkor/quiver

varkor

commit sha 3212187bcb810b23b8576ebff34d33aa4e5a30f4

Implement curved arrows I wrote a new arrow rendering library from scratch. It significantly improves upon the previous library, and as a happy consequence there are improvements to the user experience too.

view details

push time in 10 days

PR merged varkor/quiver

Implement curved arrows

image Fixes #5. Fixes #30.

I wrote a new arrow rendering library from scratch. It significantly improves upon the previous library, and as a happy consequence there are improvements to the user experience too.

+2671 -1496

0 comment

9 changed files

varkor

pr closed time in 10 days

issue closedvarkor/quiver

Difficult to select arrows

The circles that allow dragging the endpoint around are quite large and can't be hidden, so sometimes it becomes difficult to select the arrow itself because the grey area around it is mostly taken up by these circles. It would be great to either

  • make the circles smaller
  • hide them until the user holds down some key (it's less common to want to drag the endpoint of an arrow around than just selecting it to change its label, alignment, etc.)
  • select the arrow when the user clicks on the circle

image

closed time in 10 days

DimaSamoz

issue closedvarkor/quiver

Curved arrows

This is the main feature that quiver is currently missing. It's actually been partially-implemented on a branch (https://github.com/varkor/quiver/tree/curves) for over a year. I just need to get around to finishing it off. The main difficulty is accounting for all of the possible arrow styles, which now need to be potentially curved too. In addition, the circular bounding "boxes" for the vertices doesn't work quite so well with curved edges. image (An example curved arrow from the branch.)

closed time in 10 days

varkor

PR opened varkor/quiver

Implement curved arrows

image Fixes #5. Fixes #30.

I wrote a new arrow rendering library from scratch. It significantly improves upon the previous library, and as a happy consequence there are improvements to the user experience too.

+2671 -1496

0 comment

9 changed files

pr created time in 10 days

push eventvarkor/quiver

varkor

commit sha be476d518aee935a6aed2b6a3a0a656b143330f5

Remove experimentation file

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha 200484b3e4a089a3fd3056062c7b5d6fbae5e2c3

Start improving Bézier--rect intersection

view details

varkor

commit sha 566ff5c8cb3669af07599200aaa761155b5104aa

Intersect with rounded rectangles

view details

varkor

commit sha 4bcd8e476e105f154469e6779285afb3184cd7cb

Update TODO list

view details

varkor

commit sha 33969741db79c3f1cf81083bb601cbd82412e49b

Add hook tails

view details

varkor

commit sha 66542ca4a880ddda12f16e1aeeaa8b52118b3f1a

Round corners of edge background

view details

varkor

commit sha 9e43c6d629fc1efdc9407e68114b7212de7dbbbc

Add shortening

view details

varkor

commit sha 94cfcb613dcef0bc69ef8e8e81a08b827714531c

Add adjunction style

view details

varkor

commit sha cbe3c5ca08d8691835d24ed4b818c3fb10c4db5c

Add pullback corners

view details

varkor

commit sha 64549f2ef9087b94d26e2e15fecb24ae873f654b

Do some clipping

view details

varkor

commit sha 9d2a8bc024448a20d1bcf77fe68b1046e1ce5d04

Do some preliminary refactoring

view details

varkor

commit sha 46813d8a9cf830db39a54f32d304bc5a678c01d2

Improve arrow caps

view details

varkor

commit sha e9fbdaad4e5a936705db794112e24b4f876d441b

Fix display of harpoons

view details

varkor

commit sha e739a8462b222560ec9b148970216d9e25d44892

Make gap work with dotted and dashed lines

view details

varkor

commit sha 447f6bd3d7ba20cead6299f61f19f74ba99de93c

Use round cap for lines

view details

varkor

commit sha ada3effc08dbf775116b0bf3faf8187297739398

Or not

view details

varkor

commit sha 12c9f864a961afad9f60298acb497b15a18ffaf0

Fix display of dotted and dashed lines for squiggly lines

view details

varkor

commit sha 05c671b714b3641b6626e91566d044fece4d3969

Fix the drawing of hooks

view details

varkor

commit sha bbe3c7e3b2b18dccdac0fe68f9fdb4e411006828

Fix spacing for hooks

view details

varkor

commit sha 91f71c28634c9840852904eed1e4e69ba7bfae0e

Correct line length for monos

view details

varkor

commit sha 05d631ffe0a8ef0695e61d97968fa32437d9a2bb

Allow extra shortening at one end of the edge

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha 8fa457ef1add8da9b175b5d246eb7523d4c00138

Use the new arrow library for the buttons

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha b418016ad3b259f399e439f925e87c8b404a8ed5

Add arrow colours

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha fa876cbb4c26898da135f0565d915cd248015427

Deal with zero-length arrows

view details

push time in 10 days

pull request commentrust-lang/rfcs

Enum variant types

If anyone is interested in prototyping this feature, which would give us more experience with the design implications (cf. https://github.com/rust-lang/rfcs/pull/2593#issuecomment-486997257), I would be more than happy to mentor the implementation. Having a working prototype makes it much easier to understand how the feature interacts with other language features. I intended to do so myself, but at the moment there are higher-priority features needing attention.

varkor

comment created time in 10 days

push eventvarkor/quiver

varkor

commit sha abe889fa3c201f4fa44c1300bc0c6176a7eb255d

Prevent hover effect whilst dragging

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha 69b0abe2d26a51bb318d0c7c9a291b49e5c83a4d

Refactor arrow rendering code

view details

push time in 10 days

pull request commentrust-lang/rust

Clean up diagnostics for arithmetic operation errors

@bors r=ecstatic-morse

varkor

comment created time in 10 days

push eventvarkor/quiver

varkor

commit sha 63eaf003c59db376064a0ec6425a19d8325cea1c

Remove reliance on `ui` in export

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha f19c7c3d516a3ff51d0b0906422d7bf523022e59

Remove redundant code

view details

push time in 10 days

push eventvarkor/rust

Marcel Hellwig

commit sha 73e27b3e18dcbbef3a36620c4a44306e2bbdcd13

deny(unsafe_op_in_unsafe_fn) in libstd/process.rs

view details

Ivan Tham

commit sha a7468705cbf0fb551b8b1d8b420123262f7d92b2

Use translated variable for test string Test should be educative, added english translation and pronounciation.

view details

Ivan Tham

commit sha ba4c4988161abbe58e973b792c7e271785b4bc4d

Add more info for Vec Drain doc See its documentation for more

view details

Ivan Tham

commit sha 71484121001b69aefdc41fd7192b7095250517a7

Vec slice example fix style and show type elision

view details

CDirkx

commit sha ea5dc0909ea1ed4135f1bdecbaa3423051be578d

Make some Ordering methods const Constify the following methods of `core::cmp::Ordering`: - `reverse` - `then` Stabilizes these methods as const under the `const_ordering` feature. Also adds a test for these methods in a const context. Possible because of #49146 (Allow `if` and `match` in constants).

view details

Howard Su

commit sha a80d39041e2d5cd58a846c9ef9e01ee9d691a7ed

Use inline(never) instead of cold inline(never) is better way to avoid optimizer to inline the function instead of cold.

view details

Christiaan Dirkx

commit sha 79d563c819483eaf6e67b6aaaef9d0ca6030337d

Move const tests for `Ordering` to `library\core` Part of #76268

view details

Tomasz Miąsko

commit sha b54386ab7a9da8a4f22db3a35a9ec7b0f2b98b6c

Detect overflow in proc_macro_server subspan

view details

Tomasz Miąsko

commit sha d98bac4e4e3cc87ec9b848c173d570ebe2aa30b6

Add tests for overflow in Vec::drain

view details

Tomasz Miąsko

commit sha f8cfb2f5ad847b871399dfef9b8b8ff4e84a75cb

Add tests for overflow in String / VecDeque operations using ranges

view details

Ayush Kumar Mishra

commit sha 941dca8ed238a04a55741127165e9ad80671ed8a

Add Arith Tests in Library

view details

Ayush Kumar Mishra

commit sha dc37b553accd4fb2f8d0c59f69c701b524361cc2

Minor refactoring

view details

Ayush Kumar Mishra

commit sha 7d834c87d2ebb3d8dd4895bc5fabc4d44a1d2b52

Move Various str tests in library

view details

Jens Reidel

commit sha 78097d96828c16a259fa9b5c2430e8d9ff1820b3

initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm

view details

Michael Howell

commit sha d85db82960db80132a10d25e0fe7dfd5f4736d0f

Add documentation for `impl<T> From<T> for Poll<T>`

view details

Michael Howell

commit sha 8b0d0a0cadbaaf0e7f4114e289a71981872c8587

Add documentation for `impl<T> From<BinaryHeap<T>> for Vec<T>`

view details

Aaron Hill

commit sha d18b4bb7a735add53cad717fd96ec5f4b89d752d

Note when a a move/borrow error is caused by a deref coercion Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.

view details

aticu

commit sha 1c1bb1309f5b2e15438711b701f6ab59f04fd633

Improve E0118 description

view details

Joshua Nelson

commit sha 85ab152be78ffaf7dd97f60ececceda28f4e4802

Update bootstrap readme - Reflect changes in x.py defaults - Remove recommendation to use nightly for incremental; it works fine on beta - Remove note that incremental chooses stage 1 by default; stage 1 is already the default - Update Discord -> Zulip

view details

Ralf Jung

commit sha c32127675a4a4b3fdf23d06602187accf584b687

move guaranteed{ne,eq} implementation to compile-time machine

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha cec4ffedc2f65e7c170a5a1e2c7a3c3fb7f56133

Fix rendering issue with harpoons and hooks with squiggly edges

view details

push time in 10 days

push eventvarkor/quiver

varkor

commit sha 6032ac864bee90ea68c1c2b7e6e533b9d20c1eac

Refactor non-UI code

view details

push time in 10 days

issue commentvarkor/quiver

Difficult to select arrows

This is going to be addressed by #5, where endpoints are rendered differently. I've found the experience much more pleasant so far. image

DimaSamoz

comment created time in 11 days

issue openedvarkor/quiver

Investigate performance improvements

On larger diagrams at the moment, quiver can seem a little slow. So far I haven't paid much attention to performance, and it's likely that there are some easy wins here.

created time in 11 days

more