profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/tlyu/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Taylor Yu tlyu formerly at @krb5 and @torproject. sometimes contributor to @rust-lang. they/she

tlyu/krb5-anonsvn 1

git-svn mirror of MIT krb5 anonsvn repository

rbasch/krb5 0

MIT Kerberos

tlyu/cammac 0

working documents for CAMMAC specification

tlyu/krb5 0

mirror of MIT krb5 repository

tlyu/krbdev-services 0

infrastructure services for MIT krb5 development

tlyu/lgbtq-technology.github.io 0

The LGBTQ Slack website including Code of Conduct and culture document

tlyu/neveragaindottech.github.io 0

Source files for the neveragain.tech site

tlyu/npm-ietf 0

IETF Internet Drafts

pull request commentrust-lang/rust

move implicit `Sized` predicate to end of list

Rebased again.

tlyu

comment created time in 5 days

push eventtlyu/rust

Joshua Nelson

commit sha 23bbd65d968ef385fa7a7cd90ea8252bd78081b1

Remove unstable `--pretty` flag It doesn't do anything `--unpretty` doesn't, and due to a bug, also didn't show up in `--help`. I don't think there's any reason to keep it around, I haven't seen anyone using it.

view details

Alik Aslanyan

commit sha 28501cd80fe15152dd9d4104a65f1b1260b53d13

Implement setting thread name for Fuchsia

view details

Alik Aslanyan

commit sha 2ac0b3ed54b3ddfb2f6abfd7f0c1cbd6a924fc1c

Update library/std/src/sys/unix/thread.rs Co-authored-by: Joshua Nelson <joshua@yottadb.com>

view details

Cameron Steffen

commit sha 25c66a13a9b9a646e247f8ed15828d621cdf30fa

Suggest lint groups

view details

marcusdunn

commit sha ef65e091dbf4063c019d3429789f3a0d0c73d098

added unstable-book entry for bindings_after_at

view details

marcusdunn

commit sha 2d74cd255d599436675b2f67ad3ad1956dc9f02a

made doc entry more consistant with others

view details

marcusdunn

commit sha 751ddb7eb2d585c39d4461a333c9b3408114fcfa

updated the feature-gate listing

view details

marcusdunn

commit sha b908905b3defa075d08661dc5916219a870b4856

changeded bindings_after_at from active to accepted

view details

marcusdunn

commit sha a32d2b43a2ac802a3fc4c601e07828a4eace89a8

removed uses of feature gate

view details

marcusdunn

commit sha 21dee3cbf843d1d897da6ace5143f5a14d475dbe

removed conditional check on bindings_after_at and resulting dead code

view details

marcusdunn

commit sha a49a6827afeaaeca48f36d1fd0ac4c07de053602

removed more uses of feature gate

view details

marcusdunn

commit sha a11c8e7ff348fa5747b7a06390d95254627f8e0e

replaced feature-gate use with cfg_attr

view details

marcusdunn

commit sha 2d82b4a2b7ea6612b937dc4457f73409cd967e5d

removed entry for bindings after at in unstable book

view details

marcusdunn

commit sha 43d8854b560d4ad6750c2057e922f20b47221b8b

removed unneeded brackets on import

view details

marcusdunn

commit sha efc5714e59608b6f9f50481aca41a3ffa6160ea4

updated line #'s on ui tests and removed feature flag test

view details

marcusdunn

commit sha 5f9e33f680a4e8caac9f02bb0908d031a2dbaca0

removed ref to bindings_after_at

view details

marcusdunn

commit sha c2af4cb9a3ce0c6a5ea9c52ac8988715842db4d7

added back bindings_after_at as a cfg_attr

view details

Théo Degioanni

commit sha a77e2ad5338e0c417dd5c4f5958b8aab526322d6

implemented separate_const_switch MIR opt un-update itertools improve predecessor amount short-circuiting cleanup and comments somewhat improved drawing

view details

Erin Power

commit sha b0897ff2ee8346def3414c588fb7ae140efe0208

Update RELEASES.md for 1.54.0

view details

XAMPPRocky

commit sha 6d4161bb16c9333212bbd137db4d9a59d2f9aef4

Update RELEASES.md Co-authored-by: Michael <5672750+mibac138@users.noreply.github.com>

view details

push time in 5 days

pull request commentrust-lang/rust

bootstrap.py: use `git rev-list` for robustness

Looks like #87513 has merged; should I rebase and/or squash?

tlyu

comment created time in 5 days

pull request commentrust-lang/rust

bootstrap.py: use `git rev-list` for robustness

Pushed an update. Now both of them use --first-parent and --merges.

tlyu

comment created time in 6 days

push eventtlyu/rust

Taylor Yu

commit sha e0d7a591a52da064727e4ae143ef6ae1364c5d02

boostrap.py: only look for merges by bors Only look for commits by bors that are merge commits, because those are the only ones with CI artifacts. Also, use `--first-parent` to avoid traversing stuff like rollup branches.

view details

push time in 6 days

pull request commentrust-lang/rust

bootstrap.py: use `git rev-list` for robustness

Do we exclude non-merge commits from bors? There are a few, and I'm not sure what they have in common. Some of them look like squashes, and some look like they're in rollup branches.

I don't see why we would. The reason to use --author=bors is to make sure the commit has CI artifacts; as long as it does it doesn't matter if it's a merge or not.

I think bors might only run the CI on its auto-merge commits, not its non-merge commits? But I'd want to check with someone who knows bors/homu better.

Should the merge_base search also use --first-parent?

I don't know why we use this in the LLVM download - I'm not confident that the first parent will always be the one with a bors author, and --author=bors should be enough of a filter anyway. cc @Mark-Simulacrum, you added this originally I believe.

I think that --first-parent might help exclude merge commits that are parts of rollup merges, but I'm not sure. It does seem to exclude some of the squash commits made by bors. (See below.)

Either way I don't expect it to make a big difference, we say pretty clearly on https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy that you shouldn't use merge commits.

Most of the non-bors merge commits that I see at a casual glance seem to be parts of rollup merges.

Details on non-merge bors commits:

git log --no-merges --author=bors@rust-lang.org --pretty=%h upstream/master
76a3b609d0b
98b11c8f7bf
4b806878549
cb4553bdae5
733cb54d18c
204bb9b54b1

but

git log --first-parent --no-merges --author=bors@rust-lang.org --pretty=%h upstream/master

produces no output.

Also, digging through git log --graph for the commits listed by the first command shows that the next commit after each of those non-merge bors commits seems to be a merge commit from bors.

So now I'm leaning towards yes on --first-parent and probably yes on --merges.

tlyu

comment created time in 6 days

PR opened rust-lang/rust

bootstrap.py: use `git rev-list` for robustness

Use git rev-list instead of git log to be more robust against UI changes in git. Also, use the full email address for bors, because --author uses a substring match.

Based on #87513, but is separate because it's less minimal and may require additional manual testing.

Open questions:

  • Should the merge_base search also use --first-parent?
  • Do we exclude non-merge commits from bors? There are a few, and I'm not sure what they have in common. Some of them look like squashes, and some look like they're in rollup branches.

r? @jyn514 @rustbot label +A-rustbuild +C-cleanup

+5 -4

0 comment

1 changed file

pr created time in 6 days

create barnchtlyu/rust

branch : bootstrap-rev-list

created branch time in 6 days

pull request commentrust-lang/rust

refactor LoweringContext::lower_generics_mut

@cjgillot Thanks for the review and for the suggestions! After the merge of #87338, I rebased and did some more deindenting. Using .find() for the innermost loop also allowed the elimination of the labeled break.

tlyu

comment created time in 9 days

push eventtlyu/rust

Fabian Wolff

commit sha c692896ba27adc1c14941593349c76bd27e189f5

Recover from `&dyn mut ...` parse errors

view details

Yuki Okushi

commit sha 086eb4764a67ecb874274f712a6576bd4a273fd0

Add a help message to `unused_doc_comments` lint

view details

Yuki Okushi

commit sha 242ac57015554a543fb5b67cd5d2720e3e72ff00

Fix const-generics ICE related to binding

view details

Yuki Okushi

commit sha 13e116f1f70cce9759ce7d957e23241895542ec9

Use `BoundVarsCollector` for now

view details

Yuki Okushi

commit sha e28a93365abfa6b506f2017eac2f0971fc839306

Correct `visit_region` implementation

view details

Yuki Okushi

commit sha 884053a4b422e63a78eddd7b49793c32020d321b

Remove `ty::Binder::bind()` Co-authored-by: Noah Lev <camelidcamel@gmail.com>

view details

Fabian Wolff

commit sha 5eb83f4ec3761b69e839f364e127b8c307f6e196

Improve error reporting for modifications behind `&` references

view details

Aaron Hill

commit sha 5c9bd9c2b4fdca00410209d4c33edc3bebc63444

Recover from a misplaced inner doc comment Fixes #86781

view details

bjorn3

commit sha 55e077970891c33122ed34f7f8a061709ba01dc3

Check if the patched sysroot source is up to date before using it Fixes #1181

view details

bors

commit sha 2545459bff0aae43288e2e17bff0d332c49a6353

Auto merge of #85269 - dpaoliello:dpaoliello/DebugSymbols, r=michaelwoerister Improve debug symbol names to avoid ambiguity and work better with MSVC's debugger There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types). Instead, each debug symbol name should be unique and useful: * Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified. * Qualify the principal trait for dynamic types. * If there is no principal trait for a dynamic type, emit all other traits instead. * Respect the `qualified` argument when emitting ref and pointer types. * For implementations, emit the disambiguator. * Print const generics when emitting generic parameters or arguments. Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly: * Avoid characters with special meaning (`#`, `[`, `"`, `+`). * Never start a name with `<` or `{` as this is treated as an operator. * `>>` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this). * Emit function declarations using C/C++ style syntax (e.g., leading return type). * Emit arrays as a synthetic `array$<type, size>` type. * Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).

view details

Yuki Okushi

commit sha 58f6cb4557b2d63d311420bbf6bc63aa119f8306

Simplify `visit_region` implementation

view details

Yuki Okushi

commit sha 45470a3bcd9f26017bcdbf4d5ae07be0d922ce93

Rollup merge of #84029 - drahnr:master, r=petrochenkov add `track_path::path` fn for usage in `proc_macro`s Adds a way to declare a dependency on external files without including them, to either re-trigger the build of a file as well as covering the use case of including dependencies within the `rustc` invocation, such that tools like `sccache`/`cachepot` are able to handle references to external files which are not included. Ref #73921

view details

Yuki Okushi

commit sha fb736d96c33702f1aabac4092003c412c1d9d00a

Rollup merge of #85001 - CDirkx:bytestring, r=JohnTitor Merge `sys_common::bytestring` back into `os_str_bytes` `bytestring` contains code for correctly debug formatting a byte slice (`[u8]`). This functionality is and has historically only been used to provide the debug formatting of byte-based os-strings (on unix etc.). Having this functionality in the separate `bytestring` module was useful in the past to reduce duplication, as [when it was added](https://github.com/rust-lang/rust/pull/46798) `os_str_bytes` was still split into `sys::{unix, redox, wasi, etc.}::os_str`. However, now that is no longer the case, there is not much reason for the `bytestring` functionality to be separate from `os_str_bytes`; I don't think it is very likely that another part of std will need to handle formatting byte strings that are not os-strings in the future (everything should be `utf8`). This is why this PR merges the functionality of `bytestring` directly into the debug implementation in `os_str_bytes`.

view details

Yuki Okushi

commit sha 7fb3c29dc63fd0fcbb5c3698a6d0e4951452e671

Rollup merge of #86308 - bstrie:intrinsafe, r=JohnTitor Docs: clarify that certain intrinsics are not unsafe As determined by the hardcoded list at https://github.com/rust-lang/rust/blob/003b8eadd7a476c51956fe447894532d6e21937e/compiler/rustc_typeck/src/check/intrinsic.rs#L59-L92

view details

Yuki Okushi

commit sha f6ef2c8cbed2c119a2b7cc81baee52a4256b09bf

Rollup merge of #86796 - JohnTitor:test-70703, r=jonas-schievink Add a regression test for issue-70703 Closes #70703

view details

Yuki Okushi

commit sha 61073404830412169c20cc48f49fff34aa4bbc9f

Rollup merge of #86803 - xfix:remove-unnecessary-ampersand-from-command-args-calls, r=joshtriplett Remove & from Command::args calls in documentation Now that arrays implement `IntoIterator`, using `&` is no longer necessary. This makes examples easier to understand.

view details

Yuki Okushi

commit sha df55204afb61440204e9c26bf02889563180b685

Rollup merge of #86807 - tversteeg:patch-1, r=bjorn3 Fix double import in wasm thread The `unsupported` type is imported two times, as `super::unsupported` and as `crate::sys::unsupported`, throwing an error. Remove `super::unsupported` in favor of the other. As reported in #86802. Fix #86802

view details

Yuki Okushi

commit sha 1b136323dcd219241bf8b8949f50992a83b28954

Rollup merge of #86813 - JohnTitor:unused-doc-comments-help, r=jackh726 Add a help message to `unused_doc_comments` lint Fixes #83492 This adds a help message to suggest a plain comment like the E0658 error. I've yet to come up with the best message about the doc attribute but the current shouldn't harm anything. I was thinking of recovering in the `doc_comment_between_if_else` case, but I came to the conclusion that it unlikely happened and was an overkill.

view details

bors

commit sha 798baebde1fe77e5a660490ec64e727a5d79970d

Auto merge of #86817 - JohnTitor:rollup-rcysc95, r=JohnTitor Rollup of 7 pull requests Successful merges: - #84029 (add `track_path::path` fn for usage in `proc_macro`s) - #85001 (Merge `sys_common::bytestring` back into `os_str_bytes`) - #86308 (Docs: clarify that certain intrinsics are not unsafe) - #86796 (Add a regression test for issue-70703) - #86803 (Remove & from Command::args calls in documentation) - #86807 (Fix double import in wasm thread ) - #86813 (Add a help message to `unused_doc_comments` lint) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup

view details

Smitty

commit sha e9d69d9f8eb888a6e124c567f804c2e464c7b00a

Allocation failure in constprop panics right away

view details

push time in 9 days

Pull request review commentrust-lang/rust

refactor LoweringContext::lower_generics_mut

 impl<'hir> LoweringContext<'_, 'hir> {         }     } +    // Get the `LocalId` of `bound_pred.bounded_ty`, but only if it's a plain type parameter.+    fn get_def_id(&mut self, bound_pred: &WhereBoundPredicate) -> Option<LocalDefId> {+        match bound_pred.bounded_ty.kind {+            TyKind::Path(None, ref path) => {+                if !(path.segments.len() == 1 && bound_pred.bound_generic_params.is_empty()) {+                    return None;+                }+            }+            _ => return None,+        }+        if let Some(Res::Def(DefKind::TyParam, def_id)) =+            self.resolver.get_partial_res(bound_pred.bounded_ty.id).map(|d| d.base_res())+        {+            if let Some(def_id) = def_id.as_local() {+                return Some(def_id);+            }+        }+        None+    }+     pub(super) fn lower_generics_mut(         &mut self,         generics: &Generics,         itctx: ImplTraitContext<'_, 'hir>,     ) -> GenericsCtor<'hir> {-        // Collect `?Trait` bounds in where clause and move them to parameter definitions.-        // FIXME: this could probably be done with less rightward drift. It also looks like two-        // control paths where `report_error` is called are the only paths that advance to after the-        // match statement, so the error reporting could probably just be moved there.+        // Collect `?Trait` bounds in where clause and move them to+        // parameter definitions. Currently, the decision to add the+        // predicate for the implicit `Sized` bound only examines the+        // generic parameters, not the where clauses, to discover any+        // `?Sized` bounds. (e.g., `AstConv::is_unsized`)         let mut add_bounds: NodeMap<Vec<_>> = Default::default();         for pred in &generics.where_clause.predicates {-            if let WherePredicate::BoundPredicate(ref bound_pred) = *pred {-                'next_bound: for bound in &bound_pred.bounds {-                    if let GenericBound::Trait(_, TraitBoundModifier::Maybe) = *bound {-                        let report_error = |this: &mut Self| {-                            this.diagnostic().span_err(-                                bound_pred.bounded_ty.span,-                                "`?Trait` bounds are only permitted at the \-                                 point where a type parameter is declared",-                            );-                        };-                        // Check if the where clause type is a plain type parameter.-                        match bound_pred.bounded_ty.kind {-                            TyKind::Path(None, ref path)-                                if path.segments.len() == 1-                                    && bound_pred.bound_generic_params.is_empty() =>-                            {-                                if let Some(Res::Def(DefKind::TyParam, def_id)) = self-                                    .resolver-                                    .get_partial_res(bound_pred.bounded_ty.id)-                                    .map(|d| d.base_res())-                                {-                                    if let Some(def_id) = def_id.as_local() {-                                        for param in &generics.params {-                                            if let GenericParamKind::Type { .. } = param.kind {-                                                if def_id == self.resolver.local_def_id(param.id) {-                                                    add_bounds-                                                        .entry(param.id)-                                                        .or_default()-                                                        .push(bound.clone());-                                                    continue 'next_bound;-                                                }-                                            }-                                        }-                                    }-                                }-                                report_error(self)-                            }-                            _ => report_error(self),+            let bound_pred = match *pred {+                WherePredicate::BoundPredicate(ref bound_pred) => bound_pred,+                _ => continue,+            };+            'next_bound: for bound in &bound_pred.bounds {+                if !matches!(*bound, GenericBound::Trait(_, TraitBoundModifier::Maybe)) {+                    continue;+                }+                // Check if the where clause type is a plain type parameter.+                if let Some(def_id) = self.get_def_id(bound_pred) {+                    // Search for it in the generic type parameters.+                    for param in &generics.params {+                        if !matches!(param.kind, GenericParamKind::Type { .. }) {+                            continue;+                        }+                        if def_id == self.resolver.local_def_id(param.id) {+                            add_bounds.entry(param.id).or_default().push(bound.clone());+                            continue 'next_bound;                         }                     }

Are you saying that param.id won't match unless it's a type parameter? I guess duplicate LocalDefIds aren't supposed to happen, and we already know that def_id is for a TyParam. I'm also wary of adding an assertion where there wasn't one in the original code.

On the other hand, the matches! will allow skipping of calls to self.resolver.local_def_id for non-type generic parameters, which could have a performance impact, given that this function is kind of quadratic in the number of generic parameters.

tlyu

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

refactor LoweringContext::lower_generics_mut

 impl<'hir> LoweringContext<'_, 'hir> {         }     } +    // Get the `LocalId` of `bound_pred.bounded_ty`, but only if it's a plain type parameter.+    fn get_def_id(&mut self, bound_pred: &WhereBoundPredicate) -> Option<LocalDefId> {

I think ty_param_id is probably more accurate.

tlyu

comment created time in 11 days

PullRequestReviewEvent

delete branch tlyu/rust-lang-reference

delete branch : lifetime-bounds-wording

delete time in 11 days

delete branch tlyu/rust-lang-reference

delete branch : sized-bound-fixes

delete time in 11 days

delete branch tlyu/rust-lang-reference

delete branch : generic-bounds-checking

delete time in 11 days

delete branch tlyu/rust

delete branch : option-result-overviews

delete time in 11 days

delete branch tlyu/rust

delete branch : stdin-forwarders

delete time in 11 days

pull request commentrust-lang/rust

move implicit `Sized` predicate to end of list

@estebank Rebase done. I looked at #16966 and the change in the stderr in this PR isn't a necessarily a regression of the substance of that issue, which is about duplication of error messages. (The change in src/test/ui/issues/issue-16966.stderr is more (potentially-useless) verbosity than there used to be, but there's no repetition.)

I think there's a big rabbit hole here of various error reporting heuristics that use the failure to satisfy the implicit Sized constraint as a way of suppressing excess verbosity. I'm not sure what to do about them, because in theory, the ordering of trait bounds should be irrelevant to type checking results, right?

tlyu

comment created time in 13 days

push eventtlyu/rust

Mara Bos

commit sha c856e6fa531a0a84819578272ae01d3cabc2cd4d

Add machine applicable suggestion to unknown prefix error.

view details

Mara Bos

commit sha ce43fc9404f7a205d882ea9146c3f568229b96b9

Fix note in reserved prefix error.

view details

Mara Bos

commit sha 40fb2e97053e2655016688264ff19160741c1dbb

Update reserved-prefixes test output.

view details

Mara Bos

commit sha d837c00d1008c2ab13bf80117b81f5e482fc9edb

Add migration lint for reserved prefixes.

view details

Mara Bos

commit sha 3b18e215a3517bf32cc598b6e14743b14e4a928e

Add test for the reserved_prefix migration lint.

view details

Mara Bos

commit sha 6adce70a58808426753fa8e74068dcb959c004a6

Improve comments for reserved prefixes. Co-authored-by: Niko Matsakis <niko@alum.mit.edu>

view details

Mara Bos

commit sha d40be0fc6418affeeb765a9b6a99315e90aa57c8

Check the span's edition for the reserved prefixes.

view details

Mara Bos

commit sha 0eeeebc990719b666a5cf4e3e488c79751596f87

Rename 'bad prefix' to 'unknown prefix'.

view details

Mara Bos

commit sha c7f7c2efe02170850428e435b5a616f0bbc4ac37

Add quote!() example to reserved_prefix lint test.

view details

Mara Bos

commit sha 7490305e13bd90b4c4697d465ceea8df2625a7ad

No reserved_prefix suggestion in proc macro call_site.

view details

Mara Bos

commit sha 2bcd66310062b54b07216008f9e10bc063f9ad5e

Add reserved_prefixe tests for macros from different editions.

view details

lrh2000

commit sha e9fc942b4db1946993477ed3816d409a95d98d88

Use FutureIncompatibilityReason to denote edition

view details

bors

commit sha 3ddb78a34608848a60f6ca5b6ccfde8340302372

Auto merge of #86449 - Stupremee:render-self-cast-in-type-bound, r=GuillaumeGomez rustdoc: Render `<Self as X>::Y` type casts properly across crate bounds My last PR that introduced the type casting did not work for cross-crate re-exported traits, which is fixed in this PR. Fully resolves #85454

view details

Manuel Drehwald

commit sha abdd24a0404e2ce7c879297da4aa66cf4e64ab79

Remove dropping of loaded plugins and better debug info

view details

Guillaume Gomez

commit sha a5dd8d9724aae7bf5b651b73dce9f5d8b32f5adc

Fix font weight on types, methods and associated types/consts

view details

bors

commit sha a1411de9de38e0fed728874580218338160eb185

Auto merge of #86267 - ZuseZ4:master, r=nagisa Allow loading of llvm plugins on nightly Based on a discussion in #82734 / with `@wsmoses.` Mainly moves [this](https://github.com/wsmoses/rust/commit/0149bc4e7e596005c665b132877abebe5258a0f6) behind a -Z flag, so it can only be used on nightly, as requested by `@nagisa` in https://github.com/rust-lang/rust/issues/82734#issuecomment-835863940 This change allows loading of llvm plugins like Enzyme. Right now it also requires a shared library LLVM build of rustc for symbol resolution. ```rust // test.rs extern { fn __enzyme_autodiff(_: usize, ...) -> f64; } fn square(x : f64) -> f64 { return x * x; } fn main() { unsafe { println!("Hello, world {} {}!", square(3.0), __enzyme_autodiff(square as usize, 3.0)); } } ``` ``` ./rustc test.rs -Z llvm-plugins="./LLVMEnzyme-12.so" -C passes="enzyme" ./test Hello, world 9 6! ``` I will try to figure out how to simplify the usage and get this into stable in a later iteration, but having this on nightly will already help testing further steps.

view details

Guillaume Gomez

commit sha 7a5837c81009293f9466a6426fa203ae13d985e8

Remove erroneously created file

view details

Guillaume Gomez

commit sha 2fd1229a1aad7d3335de588b29396886b92cdb48

Add tests to ensure the font-weight is the correct one

view details

Fabian Wolff

commit sha a8b57723d41d5f8b58bc4796ecb4bde0ed00e639

Use `Option::map()` instead of `if let`

view details

Fabian Wolff

commit sha e8ebf98742a46aef11d382d5cbad3d9bb9098b19

Reorder some lines in `unpretty-expr-fn-arg.rs`

view details

push time in 13 days

Pull request review commentrust-lang/rust

Tweak spans for trait bounds on associated types

 pub enum GenericBound<'hir> {     Trait(PolyTraitRef<'hir>, TraitBoundModifier),     // FIXME(davidtwco): Introduce `PolyTraitRef::LangItem`     LangItemTrait(LangItem, Span, HirId, &'hir GenericArgs<'hir>),+    Unsized(Span),

Hm, I guess leaving off the HirId completely is one way to work around breaking the HIR invariant. Will the lack of HirId here cause problems later on, though?

estebank

comment created time in 17 days

PullRequestReviewEvent

pull request commentrust-lang/rust

fix typo in compile_fail doctest

Thanks! I would have hoped that the ordinary doctest pass would have caught that, especially given the error code number.

RalfJung

comment created time in 17 days

PullRequestReviewEvent

Pull request review commentrust-lang/reference

fix wording/punctuation in "Lifetime bounds"

 fn name_figure<U: Shape>( } ``` +Bounds that don't use the item's parameters or [higher-ranked lifetimes] are+checked when the item is defined. It is an error for such a bound to be false.++[`Copy`], [`Clone`], and [`Sized`] bounds are also checked for certain generic types when using the item, even if the use does not provide a concrete type.+It is an error to have `Copy` or `Clone` as a bound on a mutable reference, [trait object], or [slice][arrays].

Thanks! Updated in the upstream branch (for #1060) and rebased.

tlyu

comment created time in 19 days

push eventtlyu/rust-lang-reference

Taylor Yu

commit sha 50c855b244677026076aa666cfd6b2e05be8be8c

update moved text to one line per sentence

view details

Taylor Yu

commit sha a1625965afe5fbec615a6d458a6b9ee0f24bd448

update cross-reference to slice

view details

Taylor Yu

commit sha f5088eaa70292be9300162da47b34600a5890aa6

fix wording/punctuation in "Lifetime bounds" Clarify that "outlives" really means "lives at least as long as". Also fix some more minor punctuation and wording issues.

view details

Taylor Yu

commit sha 471bfd2ca997c4e441de734b0b9c13be784ce1fb

document implicit lifetime bounds Add documentation about implicit lifetime bounds that the compiler can infer for functions, trait implementations, and structs. This draws from RFC 2093 (for structs) and RFC 1214 for functions and trait implementations.

view details

push time in 19 days

push eventtlyu/rust-lang-reference

Taylor Yu

commit sha 50c855b244677026076aa666cfd6b2e05be8be8c

update moved text to one line per sentence

view details

Taylor Yu

commit sha a1625965afe5fbec615a6d458a6b9ee0f24bd448

update cross-reference to slice

view details

Taylor Yu

commit sha f5088eaa70292be9300162da47b34600a5890aa6

fix wording/punctuation in "Lifetime bounds" Clarify that "outlives" really means "lives at least as long as". Also fix some more minor punctuation and wording issues.

view details

push time in 19 days

push eventtlyu/rust-lang-reference

Taylor Yu

commit sha a1625965afe5fbec615a6d458a6b9ee0f24bd448

update cross-reference to slice

view details

push time in 19 days

Pull request review commentrust-lang/rust

create method overview docs for core::option and core::result

 //! assert_eq!(res, Some(vec![2, 4, 8])); //! ``` //!-//! [`Option`] also implements the [`Product`] and [`Sum`] traits, allowing-//! an iterator over [`Option`] values to provide the-//! [`product`][m.product] and [`sum`][m.sum] methods.+//! [`Option`] also implements the [`Product`][impl-Product] and+//! [`Sum`][impl-Sum] traits, allowing an iterator over [`Option`] values+//! to provide the [`product`][Iterator::product] and+//! [`sum`][Iterator::sum] methods. //!-//! [`Product`]: Option#impl-Product%3COption%3CU%3E%3E-//! [`Sum`]: Option#impl-Sum%3COption%3CU%3E%3E-//! [m.product]: crate::iter::Iterator::product-//! [m.sum]: crate::iter::Iterator::sum+//! [impl-Product]: Option#impl-Product%3COption%3CU%3E%3E+//! [impl-Sum]: Option#impl-Sum%3COption%3CU%3E%3E+//!+//! ```+//! let v = vec![None, Some(1), Some(2), Some(3)];+//! let res: Option<i32> = v.into_iter().sum();+//! assert_eq!(res, None);+//! let v = vec![Some(1), Some(2), Some(21)];+//! let res: Option<i32> = v.into_iter().product();+//! assert_eq!(res, Some(42));+//! ``` //! //! ## Modifying an [`Option`] in-place //!-//! These methods return a mutable reference to the contained value of a-//! [`Some`].+//! These methods return a mutable reference to the contained value of an+//! [`Option<T>`]: //! //! * [`insert`] inserts a value, dropping any old contents //! * [`get_or_insert`] gets the current value, inserting a provided //!   default value if it is [`None`] //! * [`get_or_insert_default`] gets the current value, inserting the-//!   default value of type `T` if it is [`None`]+//!   default value of type `T` (which must implement [`Default`]) if it is+//!   [`None`] //! * [`get_or_insert_with`] gets the current value, inserting a default //!   computed by the provided function if it is [`None`] //!-//! [`insert`]: Option::insert //! [`get_or_insert`]: Option::get_or_insert //! [`get_or_insert_default`]: Option::get_or_insert_default //! [`get_or_insert_with`]: Option::get_or_insert_with+//! [`insert`]: Option::insert //!-//! These methods transfer ownership of the [`Option`].+//! These methods transfer ownership of the contained of an [`Option`]:

Thanks! I think it's already fixed in the latest version. https://github.com/rust-lang/rust/pull/86211/commits/2b4a6aa1494d80564662271900fa3c73d713411e

tlyu

comment created time in 20 days