From f7bbaa742ed8c5c353aa3eb843f11e84b489538e Mon Sep 17 00:00:00 2001 From: riyueguang Date: Fri, 26 Jul 2024 17:54:07 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: riyueguang --- src/licenses.md | 2 +- src/queries/incremental-compilation-in-detail.md | 2 +- src/ty_module/instantiating_binders.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/licenses.md b/src/licenses.md index aa8286714..1d5158a9c 100644 --- a/src/licenses.md +++ b/src/licenses.md @@ -20,7 +20,7 @@ from. - The algorithm or code pattern seems like it was likely copied from somewhere else. - When adding new dependencies, double check the dependency's license. -In all of these cases, we will want to check that source to make sure it it is licensed in a way +In all of these cases, we will want to check that source to make sure it is licensed in a way that is compatible with Rust’s license. Examples diff --git a/src/queries/incremental-compilation-in-detail.md b/src/queries/incremental-compilation-in-detail.md index 76ebf10e8..0d4604ddd 100644 --- a/src/queries/incremental-compilation-in-detail.md +++ b/src/queries/incremental-compilation-in-detail.md @@ -529,7 +529,7 @@ session. The overhead of doing so is a few percent of total compilation time. Data structures used as query results could be factored in a way that removes edges from the dependency graph. Especially "span" information is very volatile, -so including it in query result will increase the chance that that result won't +so including it in query result will increase the chance that result won't be reusable. See for more information. diff --git a/src/ty_module/instantiating_binders.md b/src/ty_module/instantiating_binders.md index f5e41b0a5..22f4eb55c 100644 --- a/src/ty_module/instantiating_binders.md +++ b/src/ty_module/instantiating_binders.md @@ -71,7 +71,7 @@ Given these trait implementations `u32: Bar` should _not_ hold. `&'a u32` only i - There is a where clause `for<'a> &'^0 T: Trait` on the impl, as we instantiated the early binder with `u32` we actually have to prove `for<'a> &'^0 u32: Trait` - We find the `impl Trait for T` impl, we would wind up instantiating the `EarlyBinder` with `&'^0 u32` - There is a where clause `for<'a> T: Other<'^0>`, as we instantiated the early binder with `&'^0 u32` we actually have to prove `for<'a> &'^0 u32: Other<'^0>` -- We find the `impl<'a> Other<'a> for &'a u32` and this impl is enoguh to prove the the bound as the lifetime on the borrow and on the trait are both `'^0` +- We find the `impl<'a> Other<'a> for &'a u32` and this impl is enoguh to prove the bound as the lifetime on the borrow and on the trait are both `'^0` This end result is incorrect as we had two separate binders introducing their own generic parameters, the trait bound should have ended up as something like `for<'a1, 'a2> &'^1 u32: Other<'^0>` which is _not_ satisfied by the `impl<'a> Other<'a> for &'a u32`.