profile
viewpoint
Gary Guo nbdd0121 University of Cambridge Cambridge, United Kingdom https://garyguo.net

nbdd0121/ELFSharedLibrary 4

ELF Shared Library Loader

nbdd0121/es-error-stack 4

ECMAScript Error Stacktrace Proposal

nbdd0121/GenerationalGC 4

Precise Generational Garbage Collector For C++

nbdd0121/AMLInterpreter 3

C++ based AML(ACPI Machine Language) interpreter

nbdd0121/edgeos-patch 2

A simple patch to make EdgeOS better.

moegirlwiki/FlashMP3 1

FlashMP3 extension fork

nbdd0121/DeltaDB 1

A delta-based blob storage system

nbdd0121/JS-Text-Preprocessor 1

JavaScript Text Preprocessing Tool / Servlet Page Server

nbdd0121/lowrisc-chip 1

The root repo for lowRISC project and FPGA demos.

push eventsuisei-cn/ayt-translator

dependabot[bot]

commit sha 037ed41e478cb2f644dd445550ae22f0a1e68570

Bump http-proxy from 1.18.0 to 1.18.1 Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1. - [Release notes](https://github.com/http-party/node-http-proxy/releases) - [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md) - [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 15 days

PR merged suisei-cn/ayt-translator

Bump http-proxy from 1.18.0 to 1.18.1 dependencies

Bumps http-proxy from 1.18.0 to 1.18.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md">http-proxy's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/http-party/node-http-proxy/compare/1.18.0...v1.18.1">v1.18.1</a> - 2020-05-17</h2> <h3>Merged</h3> <ul> <li>Skip sending the proxyReq event when the expect header is present <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1447"><code>#1447</code></a></li> <li>Remove node6 support, add node12 to build <a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/pull/1397"><code>#1397</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/http-party/node-http-proxy/commit/9b96cd725127a024dabebec6c7ea8c807272223d"><code>9b96cd7</code></a> 1.18.1</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/335aeeba2f0c286dc89c402eeb76af47834c89a3"><code>335aeeb</code></a> Skip sending the proxyReq event when the expect header is present (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1447">#1447</a>)</li> <li><a href="https://github.com/http-party/node-http-proxy/commit/dba39668ba4c9ad461316e834b2d64b77e1ca88e"><code>dba3966</code></a> Remove node6 support, add node12 to build (<a href="https://github-redirect.dependabot.com/http-party/node-http-proxy/issues/1397">#1397</a>)</li> <li>See full diff in <a href="https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+10 -12

0 comment

1 changed file

dependabot[bot]

pr closed time in 15 days

push eventsuisei-cn/ayt-translator

dependabot[bot]

commit sha 58f664f6877b76bd562e6d482de6b31b30bbedef

Bump node-fetch from 2.6.0 to 2.6.1 Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/bitinn/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 15 days

PR merged suisei-cn/ayt-translator

Bump node-fetch from 2.6.0 to 2.6.1 dependencies

Bumps node-fetch from 2.6.0 to 2.6.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bitinn/node-fetch/releases">node-fetch's releases</a>.</em></p> <blockquote> <h2>v2.6.1</h2> <p><strong>This is an important security release. It is strongly recommended to update as soon as possible.</strong></p> <p>See <a href="https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md#v261">CHANGELOG</a> for details.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md">node-fetch's changelog</a>.</em></p> <blockquote> <h2>v2.6.1</h2> <p><strong>This is an important security release. It is strongly recommended to update as soon as possible.</strong></p> <ul> <li>Fix: honor the <code>size</code> option after following a redirect.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/node-fetch/node-fetch/commit/b5e2e41b2b50bf2997720d6125accaf0dd68c0ab"><code>b5e2e41</code></a> update version number</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/2358a6c2563d1730a0cdaccc197c611949f6a334"><code>2358a6c</code></a> Honor the <code>size</code> option after following a redirect and revert data uri support</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/8c197f8982a238b3c345c64b17bfa92e16b4f7c4"><code>8c197f8</code></a> docs: Fix typos and grammatical errors in README.md (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/686">#686</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/1e99050f944ac435fce26a9549eadcc2419a968a"><code>1e99050</code></a> fix: Change error message thrown with redirect mode set to error (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/653">#653</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/244e6f63d42025465796e3ca4ce813bf2c31fc5b"><code>244e6f6</code></a> docs: Show backers in README</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/6a5d192034a0f438551dffb6d2d8df2c00921d16"><code>6a5d192</code></a> fix: Properly parse meta tag when parameters are reversed (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/682">#682</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/47a24a03eb49a49d81b768892aee10074ed54a91"><code>47a24a0</code></a> chore: Add opencollective badge</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/7b136627c537cb24430b0310638c9177a85acee1"><code>7b13662</code></a> chore: Add funding link</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/5535c2ed478d418969ecfd60c16453462de2a53f"><code>5535c2e</code></a> fix: Check for global.fetch before binding it (<a href="https://github-redirect.dependabot.com/bitinn/node-fetch/issues/674">#674</a>)</li> <li><a href="https://github.com/node-fetch/node-fetch/commit/1d5778ad0d910dbd1584fb407a186f5a0bc1ea22"><code>1d5778a</code></a> docs: Add Discord badge</li> <li>Additional commits viewable in <a href="https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~akepinski">akepinski</a>, a new releaser for node-fetch since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+7 -2

0 comment

2 changed files

dependabot[bot]

pr closed time in 15 days

issue commentnbdd0121/r2vm

Running linux kernel

You can do r2vm config.toml and switch to lock-step by pressing Ctrl+A and then T. Alternatively, you can write 0 or 1 to CSR 0x800 to switch on/off cycle-level simulation, write 1 to CSR 0x801 to print stats and write 0 to CSR 0x801 to clear stats.

Currently the lockstep mode is just in order model plus a simple memory model. You can tweak src/sim/mod.rs to choose other models. The MESI model implementation is rough and isn't on master yet, but if you want to try it you can use the cache branch.

aj0518

comment created time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha dfebe2724e5084bdf479be6f1fd06d5507e59ae6

Fix multiplication overflow

view details

Gary Guo

commit sha b54eeccbe5844784c212c318d33824f6185ec329

Remove extra boxing in event loop

view details

Gary Guo

commit sha e68c606cd5a22c6c1e5ccef3cbda5d6ee4693c4d

Allow forced IO base for all devices

view details

Gary Guo

commit sha a6ce374d46b46e713cdfd7410a0282cebd810d3e

Do not repeatly create new DirectIoContext

view details

Gary Guo

commit sha 261f807f8fe95af1dbfbcdef57c5a64c763b31a9

Remove atomic_ext fetch_{max, min, update} are stable in Rust 1.45

view details

Gary Guo

commit sha c2558cdf39a341911b4d5bad48bd6be3594774e5

Move IoSystem to io crate

view details

Gary Guo

commit sha 23e90cd87a1ec1c3ecb9db7ba6efda0b4549f09c

Move RoCell to its own crate

view details

Gary Guo

commit sha 44db4d96a500bb3ea1925a7f1db26ba83886bc88

Fix potential deadlock when exiting from console processor hook

view details

Gary Guo

commit sha 5eba0d05c3c0fe0fffb8085386be039eaa9384ca

Allow IRQ allocation to be forced

view details

Gary Guo

commit sha 493d4f4baa4b1175f313f7dcf0b343672504d7bb

Allow PLIC address to be forced

view details

Gary Guo

commit sha c657e42e193f8244eae2ead638c58c8a2c6801d2

TLB model

view details

Gary Guo

commit sha 90067d714c6ab7da8a5199968ecbdce01b3059a0

Move require_lockstep from memory model to overall model

view details

Gary Guo

commit sha 49e573813e5b205538cb3486813857c7f882a0bb

Simple cache model

view details

Gary Guo

commit sha f5963df546492fd344e836bb361ac8592537a544

Refactor similar logic into a function

view details

Gary Guo

commit sha 8b5f3ae5732ba97b823ec16876d7bf5f628f374a

Merge branch 'cache'

view details

Gary Guo

commit sha 83c240f3e89b8af90ade594630188b25b63a6911

Accept binary firmware in addition to ELF

view details

Gary Guo

commit sha 16a75c682fd37b3786340d6095b1b15290c8f9a3

MESI

view details

push time in a month

issue commentnbdd0121/r2vm

Running linux kernel

Oh, and previously firmware can only be ELF but not binary.. This is now fixed in 83c240f, so you can give your firmware another try if that is position-independent (but I'll recommend just boot Linux in supervisor mode without extra firmware).

aj0518

comment created time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha 44db4d96a500bb3ea1925a7f1db26ba83886bc88

Fix potential deadlock when exiting from console processor hook

view details

Gary Guo

commit sha 5eba0d05c3c0fe0fffb8085386be039eaa9384ca

Allow IRQ allocation to be forced

view details

Gary Guo

commit sha 493d4f4baa4b1175f313f7dcf0b343672504d7bb

Allow PLIC address to be forced

view details

Gary Guo

commit sha c657e42e193f8244eae2ead638c58c8a2c6801d2

TLB model

view details

Gary Guo

commit sha 90067d714c6ab7da8a5199968ecbdce01b3059a0

Move require_lockstep from memory model to overall model

view details

Gary Guo

commit sha 49e573813e5b205538cb3486813857c7f882a0bb

Simple cache model

view details

Gary Guo

commit sha f5963df546492fd344e836bb361ac8592537a544

Refactor similar logic into a function

view details

Gary Guo

commit sha 8b5f3ae5732ba97b823ec16876d7bf5f628f374a

Merge branch 'cache'

view details

Gary Guo

commit sha 83c240f3e89b8af90ade594630188b25b63a6911

Accept binary firmware in addition to ELF

view details

push time in a month

issue commentnbdd0121/r2vm

Running linux kernel

Could you try without specifying the firmware field? Currently R2VM has limited support custom memory layout, so the firmware "feature" isn't really working unless you tweak the linker script to place it to a certain location.

aj0518

comment created time in a month

issue commentrust-lang/rust

Confusing borrow check error when function argument doesn't match type signature

I didn't see anything wrong with the diagnostics, as this is indeed a lifetime issue. &&mut T could be coerced to &T, so this passes typeck. However, obviously buf is a local variable so &buf has its lifetime restricted to the scope of this function. Region inference will cause the type of that expression to be Db<'buf>, so it triggers this error.

If you spell out lifetime of Db, it will gives you a different error.

struct Db<'a>(&'a str);
impl<'a> Db<'a> {
    fn new(x: &'a str) -> Self {
        Self(x)
    }
}

fn foo<'a>(buf: &'a mut str) -> Db<'a> {
    Db::<'a>::new(&buf)
}

gives

error[E0597]: `buf` does not live long enough
  --> src/lib.rs:9:19
   |
8  | fn foo<'a>(buf: &'a mut str) -> Db<'a> {
   |        -- lifetime `'a` defined here
9  |     Db::<'a>::new(&buf)
   |     --------------^^^^-
   |     |             |
   |     |             borrowed value does not live long enough
   |     argument requires that `buf` is borrowed for `'a`
10 | }
   | - `buf` dropped here while still borrowed
tmandry

comment created time in a month

issue openedrust-lang/rust

Should there be a `Once::try_call_once`

I wonder if Once should have a try_call_once method for failable initialization, which accepts a FnOnce() -> Result<(), E>.

OnceCell has a get_or_try_init method which can fail, so I think it would make sense for Once to have a failable initialisation method as well. Note that due to lack of failable init in Once right now, OnceCell currently need to rely on pub(crate) method to posion the Once for get_or_try_init.

cc #33577

@rustbot modify-labels: +T-lib

created time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha a6ce374d46b46e713cdfd7410a0282cebd810d3e

Do not repeatly create new DirectIoContext

view details

Gary Guo

commit sha 261f807f8fe95af1dbfbcdef57c5a64c763b31a9

Remove atomic_ext fetch_{max, min, update} are stable in Rust 1.45

view details

Gary Guo

commit sha c2558cdf39a341911b4d5bad48bd6be3594774e5

Move IoSystem to io crate

view details

Gary Guo

commit sha 23e90cd87a1ec1c3ecb9db7ba6efda0b4549f09c

Move RoCell to its own crate

view details

push time in a month

issue commentrust-lang/rust

Unused `format!()`s are not optimised away

You can replace the panic!() there with a println!("Executed");

Timmmm

comment created time in a month

issue closednbdd0121/MW-PinyinSort

Failure create collation in my wiki

I follow your direction download your source code to extention

then I setting in the localsettings

I successfully run updateCollation.php

but when I look at the page It's just display "?" for the english word it can be detactied, could you tell me how to fix it. Many thanks~

closed time in a month

jackeymai

issue commentnbdd0121/MW-PinyinSort

Failure create collation in my wiki

Closing due to lack of activity

jackeymai

comment created time in a month

issue closednbdd0121/MW-PinyinSort

Update

This extension is great, but is lacks update. It may fail to support latest versions of MediaWiki.

closed time in a month

Haoshuiganlong

issue commentnbdd0121/MW-PinyinSort

Update

It works well for all MediaWiki releases since the last update, and it even works well with the next upcoming MediaWiki release (1.35). I did a quick code review and found nothing to be fixed apart from a minor PHP 7.4 deprecation warning. If there is any compatibility issue with a particular MediaWiki release please describe the issue in detail.

Haoshuiganlong

comment created time in a month

push eventnbdd0121/MW-PinyinSort

Gary Guo

commit sha 1fbf4ec91117984bf9469f8ce4442451f672ac03

PHP 7.4 compatibility fix Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

view details

push time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha e68c606cd5a22c6c1e5ccef3cbda5d6ee4693c4d

Allow forced IO base for all devices

view details

push time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha dfebe2724e5084bdf479be6f1fd06d5507e59ae6

Fix multiplication overflow

view details

Gary Guo

commit sha b54eeccbe5844784c212c318d33824f6185ec329

Remove extra boxing in event loop

view details

push time in a month

issue commentrust-lang/rust

Unused `format!()`s are not optimised away

struct Foo;
impl fmt::Display for Foo {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        panic!();
    }
}

pub fn foo() {
    format!("{}", Foo);
}

There is just no guarantee that Display of an arbitrary type have no side-effects. It is true that it is side-effect free for i32, but it is beyond the capability of rustc to take advantage of that.

Timmmm

comment created time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha 4d4734b4728bd72469c8ebcf0a92ed7a0c87427d

Change virtio console config schema

view details

Gary Guo

commit sha 76e01781dbaf2749a1e39c7cbb9364a8c571bf44

Optimise PLIC level interrupts

view details

Gary Guo

commit sha 7b5e740cb73d135607ddce383e75d9bd0d0ff3d3

Add a simulated NS16550 device

view details

Gary Guo

commit sha 2d61bf6d291d08e93e6f133ef43404f7907e0ec0

Fix warnings

view details

push time in a month

push eventnbdd0121/r2vm

Gary Guo

commit sha 643d0c2ab40329ac7b343d38c8b10c2dcf1cf87e

Citation information

view details

Gary Guo

commit sha e4593bde91983055be2decd1d2637d1faeac0d0b

Raise error if supplied binary is not elf64. Closes #1.

view details

Gary Guo

commit sha e58e39eec472c2097e3533ab5d8edeb9f00e6763

Add level-triggered interrupts to PLIC

view details

Gary Guo

commit sha 6e5c58b5b333bb3fb78878380ee99d6abcab9278

Fix escape key

view details

Gary Guo

commit sha 4d4734b4728bd72469c8ebcf0a92ed7a0c87427d

Change virtio console config schema

view details

Gary Guo

commit sha 76e01781dbaf2749a1e39c7cbb9364a8c571bf44

Optimise PLIC level interrupts

view details

Gary Guo

commit sha 7b5e740cb73d135607ddce383e75d9bd0d0ff3d3

Add a simulated NS16550 device

view details

Gary Guo

commit sha 2d61bf6d291d08e93e6f133ef43404f7907e0ec0

Fix warnings

view details

Gary Guo

commit sha 64149e69adf6794d465061d21e372c28ee1e6cc6

TLB model

view details

Gary Guo

commit sha 88e34c91af99e5527130ff07873a4d71ebf40015

Move require_lockstep from memory model to overall model

view details

Gary Guo

commit sha 937a2b28292e94b28d0465e282a7d174f766170e

Simple cache model

view details

Gary Guo

commit sha cb2ff195d0fa1709ae8c6cfe4552b85939d25b8c

Refactor similar logic into a function

view details

push time in a month

issue commentrust-lang/rust

Incorrect clashing_extern_decl warning in nightly

It seems that there is a case still not being fixed, when #[repr(transparent)] is used with non-zero types.

mod a {
    use std::num::NonZeroUsize;
    extern "C" {
        fn a() -> NonZeroUsize;
    }
}

mod b {
    #[repr(transparent)]
    struct X(NonZeroUsize);
    use std::num::NonZeroUsize;
    extern "C" {
        fn a() -> X;
    }
}
nbdd0121

comment created time in a month

push eventsuisei-cn/suisei-music-web

Gary Guo

commit sha 2800bbb17ef36e3b311f5093f06e69510428e884

Fix list height

view details

push time in a month

push eventsuisei-cn/starbuttons

Gary Guo

commit sha ea1429b2b4853e5a0da1214361191158a0893663

CSS: Add missing /deep/ Hopefully this will work

view details

push time in a month

push eventsuisei-cn/starbuttons

Gary Guo

commit sha ae8aa19ae31e1555e1626c5e55ff02f0c4bed47d

CSS: Stylize language switcher

view details

push time in a month

issue commentrust-lang/rust

Compiles error when call the closure that need type inference with `&mut *b` twice

This is expected behaviour. i is inferred to have the same type as the &mut *b, rather than &mut i32. Therefore the type of foo becomes fn(&'a mut i32) for a concrete 'a, rather than for<'a> fn(&'a mut i32). Because both calls of foo uses the same 'a, the two borrows must last for the same duration, and therefore is not allowed because you cannot two mutable borrows for the same duration!

Essentially, the loss of HRTB causes the borrowck failure.

Hyuuko

comment created time in 2 months

push eventnbdd0121/MW-DeltaDB

Gary Guo

commit sha 15275b21ed3d971bba42602cf22432e9d73ae245

Bugfix

view details

push time in 2 months

push eventnbdd0121/DeltaDB

Gary Guo

commit sha b4caf274d7e0c96da2529708aecbde5647c17a3f

Format

view details

push time in 2 months

issue commentrust-lang/rust

Tracking Issue for inline assembly (`asm!`)

Not necessary true. For an operand on stack, with in(mem) you can just access it with [rsp + offset], and for an readonly operand you can access it with [rip + offset]. I do see a use-case of in(mem) which would allow address with offsets.

Amanieu

comment created time in 2 months

issue commentrust-lang/rust

Performance: `Layout::align()` can assume, that the alignment is a power of two

That's simply because LLVM has an assume intrinsic (https://llvm.org/docs/LangRef.html), so there is a Rust version of it. Semantically unreachable_unchecked is more versatile but that would probably require LLVM to do some transformation to turn it into assume.

TimDiekmann

comment created time in 2 months

issue commentrust-lang/rust

Performance: `Layout::align()` can assume, that the alignment is a power of two

Ah indeed, and core::hint::unreachable_unchecked is unstably const already (#74459), so we can use that. But it wouldn't hurt to make assume unstably const anyway.

TimDiekmann

comment created time in 2 months

issue commentrust-lang/rust

Directly passing Rc::clone(...) to a function expecting Rc<dyn Trait> produces unexpected type error

This is expected behaviour.

  • Firstly you need to know that Rc<Poem> can converted to Rc<dyn Readable> by unsize coercion. However, &Rc<Poem> cannot be converted to &Rc<dyn Readable> via unsize coercion (this is double pointer already).
  • Secondly, when you write Rc::clone, you actually ask for <Rc<_> as Clone>::clone, which involves type inference. Because coercion is not performed whenever there is a type inference, _ here can only be dyn Readable, but not Poem, so this means that you are writing <Rc<dyn Readable> as Clone>::clone(&xxx), which requires &xxx to be &dyn Readable, and by the first bullet point, this is not part of unsize coercion.

If you write Rc::<Poem>::clone(&xxx), this would be legal because the return type is not inferred, so an unsize coercion takes place. If you store the clone in a separate variable this is similar, because that variable will have type Rc<Poem> so an unsize coercion can happen when you give it to collection. The easiest way would be just to write xxx.clone() directly because that also gives you a `Rc<Poem> and permits unsize coercion.

You can read more about coercion on nomicon: https://doc.rust-lang.org/nomicon/coercions.html.

periodicaidan

comment created time in 2 months

issue commentrust-lang/rust

Suppress warnings caused by todo!()

todo!() gives a ! and considering the code after it reachable would basically just mess up the reachability analysis. If you intend to fill it later, why would a warning do any harm?

SOF3

comment created time in 2 months

issue commentrust-lang/rust

Performance: `Layout::align()` can assume, that the alignment is a power of two

We could make assume const, similar to likely/unlikely in #73778.

TimDiekmann

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 541fbbb6fab4afdeea48fdb9e94cee48991b3333

Cross-crate doc inlining test case for elided lifetime

view details

push time in 2 months

pull request commentrust-lang/rust

Display elided lifetime for non-reference type in doc

Oh sorry, it seems that it doesn't catch the case. Let me add a proper test for the re-export scenario.

nbdd0121

comment created time in 2 months

pull request commentrust-lang/rust

Display elided lifetime for non-reference type in doc

Can you also add a test case for this on cross-crate item?

test5 and test6 are cross-crate.

nbdd0121

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 505d157814ba4e7d3ee0d036832008c3221b3df4

Display elided lifetime for external paths

view details

push time in 2 months

pull request commentrust-lang/rust

Display elided lifetime for non-reference type in doc

Try modifying this too:

https://github.com/rust-lang/rust/blob/743f9327428801932bd70688b5c83f38bf61615a/src/librustdoc/clean/utils.rs#L124

Just discovered this myself 😂. Thanks anyway.

nbdd0121

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 63c0d9ca51bb471189a0d5529c8ee5491fb4e102

Display elided lifetime for non-reference type in doc

view details

Gary Guo

commit sha 4ca70819b8023e527547132936673050d408dbd3

Display elided lifetime for external paths

view details

push time in 2 months

pull request commentrust-lang/rust

Display elided lifetime for non-reference type in doc

Okay, it seems that I misunderstood the issue. It seems that the actual issue that imported docs still follow the old style, while items defined within the module follow the new style. So this PR works for core::cell::RefCell::borrow, alloc::vec::Vec::drain, std::sync::Mutex::lock, but not std::vec::Vec::drain or std::cell::RefCell::borrow. There must be something that I have missed.

nbdd0121

comment created time in 2 months

Pull request review commentrust-lang/rust

BTreeMap: enforce the panic rule imposed by `replace`

+use core::intrinsics;+use core::mem; use core::ptr;  use super::node::{marker, ForceResult::*, Handle, NodeRef};-use super::unwrap_unchecked;++/// `Option::unwrap` without the promise to panic if the option contains no value.+/// Instead, the entire process would be aborted.+fn unwrap_or_abort<T>(val: Option<T>) -> T {+    val.unwrap_or_else(|| intrinsics::abort())+}

Did you add RUST_BACKTRACE=1 and --test-args --nocapture?

ssomers

comment created time in 2 months

pull request commentrust-lang/rust

BTreeMap: enforce the panic rule imposed by `replace`

According to fickle benchmarks, the abort guarantee comes with a small price, but using intrinsics::abort instead of panic! turns it into a small gain for IntoIter.

Interesting, PanicGuard::drop should only be executed when the stack unwinds. I looked the assembly for a simple use-case and it doesn't see to have any difference for the normal path.

ssomers

comment created time in 2 months

Pull request review commentrust-lang/rust

BTreeMap: enforce the panic rule imposed by `replace`

+use core::intrinsics;+use core::mem; use core::ptr;  use super::node::{marker, ForceResult::*, Handle, NodeRef};-use super::unwrap_unchecked;++/// `Option::unwrap` without the promise to panic if the option contains no value.+/// Instead, the entire process would be aborted.+fn unwrap_or_abort<T>(val: Option<T>) -> T {+    val.unwrap_or_else(|| intrinsics::abort())+}

Sorry, I misread your comment, I mean calling replace with is not unsafe. You're correct that's unsafe.

Abort is obvious safe, but it is definitely something to avoid if not necessary. For BTreeMap's case though, we know that the option is not None, so use unwrap_unchecked provide a good chance for LLVM to optimise things out (if there isn't a I-slow bug).

I do mean a double panic situation for backtrace. A very simple demonstration on playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4692ea8a7750c37bc3c55144e5fbb12c.

ssomers

comment created time in 2 months

pull request commentrust-lang/rust

Optimize btree's unwrap_unchecked

Link to the likely root cause #74615.

ssomers

comment created time in 2 months

Pull request review commentrust-lang/rust

BTreeMap: respect the panic rule imposed by `replace`

+use core::intrinsics;+use core::mem; use core::ptr;  use super::node::{marker, ForceResult::*, Handle, NodeRef};-use super::unwrap_unchecked;++/// `Option::unwrap` without the promise to panic if the option contains no value.+/// Instead, the entire process would be aborted.+fn unwrap_or_abort<T>(val: Option<T>) -> T {+    val.unwrap_or_else(|| intrinsics::abort())+}

The opportunity to avoid an unsafe call

Calling unwrap_unchecked is not unsafe anymore with PanicGuard.

RUST_BACKTRACE seems completely useless in these double panic situations.

Shouldn't be the case. I just confirmed RUST_BACKTRACE will produce backtrace just fine. Backtrace is generally preferred to just aborting when the situation allows, because it gives you more information without debugger.

avoid the performance backlash of unwrap_unchecked

unwrap_unchecked uses intrinsics::unreachable_unchecked(), and it is supposed to be faster. The current performance drawback is due to a bug in LLVM (#74615). If that get's fixed, unwrap_unchecked would be much faster than unwrap_or_abort.

ssomers

comment created time in 2 months

pull request commentrust-lang/rust

Display elided lifetime for non-reference type in doc

Did you try doc --stage 2 library/std?

That doesn't work either. I am totally confused now.

nbdd0121

comment created time in 2 months

issue commentrust-lang/rust

Implicit lifetimes of type parameters does not work

Actually I tested that example again and found that it does not work for both HashMap and BTreeMap, so that example is actually not a MCVE. So I created this MCVE from the original example:

struct A<T>(T);
struct B<T>(T);

trait C {
    type Item;
}

impl<'a, T> C for &'a A<T> {
    type Item = &'a T;
}

impl<'a, T: 'a> C for &'a B<T> {
    type Item = &'a T;
}

trait Foo where for<'a> &'a Self: C<Item = &'a Self::Item> {
    type Item;
}

// Doesn't compile: suggest `T: 'a` is needed.
// fn foo<'a, T, I: 'a + C<Item = &'a T>>(i: I) {}

// Compiles
impl<T> Foo for A<T> {
    type Item = T;
}

// Doesn't compile: suggest `T: 'a` is needed???
// impl<T> Foo for B<T> {
//     type Item = T;
// }

A and B are identical, except that impl<'a, T> C for &'a A<T> does not have T: 'a. But for &'a A<T> to be well-formed, T: 'a must be implied. So they should perform the same?

canova

comment created time in 2 months

pull request commentrust-lang/rust

Fix regionck failure when converting Index to IndexMut

@nikomatsakis have you had time to go through this? The issue it fixes is P-critical and regression-from-stable-to-beta, so we'd need to address it asap and backport to beta.

nbdd0121

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 567e49326f1b1676cacc0bc3cb9a178e99070043

Fix elided lifetime rustdoc test case

view details

push time in 2 months

Pull request review commentrust-lang/rust

BTreeMap: respect the panic rule imposed by `replace`

+use core::intrinsics;+use core::mem; use core::ptr;  use super::node::{marker, ForceResult::*, Handle, NodeRef};-use super::unwrap_unchecked;++/// `Option::unwrap` without the promise to panic if the option contains no value.+/// Instead, the entire process would be aborted.+fn unwrap_or_abort<T>(val: Option<T>) -> T {+    val.unwrap_or_else(|| intrinsics::abort())+}

This is not necessary. Just let unwrap_unchecked panic in debug build, and let PanicGuard guarantee the safety. They do both end up aborting, but with unwrap_unchecked we have stack backtrace.

ssomers

comment created time in 2 months

pull request commentrust-lang/rust

Make `IntoIterator` lifetime bounds of `&BTreeMap` match with `&HashMap`

Well, yes, we can investigate more if we think this is a bug, but I don't think so really.

This is certainly a bug. If you look at the minimal example in the original issue:

fn foo<'a, K, V, I: 'a + IntoIterator<Item = (&'a K, &'a V)>>(i: I) {}

fn bar() {
    let map = HashMap::<u32, u32>::new();
    foo(&map);
    
    let map = BTreeMap::<u32, u32>::new();
    foo(&map);
}

This code is rejected in Rust 2015 for both HashMap and BTreeMap, suggesting that K: 'a and V: 'a must be added. In Rust 2018 this is now implied, so it should accept BTreeMap, regardless that bound is specified implicitly or explicitly. I have no objection to this PR, but I suggest we keep the original issue open or open a new issue after this PR is merged to track this discrepancy.

canova

comment created time in 2 months

pull request commentrust-lang/rust

BTreeMap: respect the panic rule imposed by `replace`

How about just make that function safe instead?

pub fn replace_with<T>(val: &mut T, f: impl FnOnce(T)->T) {
    struct PanicGuard;
    impl Drop for PanicGuard {
        fn drop(&mut self) {
            // replace_with is not safe when f panics, so use a guard to
            // trigger a double panic which will abort without drop.
            //
            // This could also be std::intrinsics::abort. 
            panic!("closure passed to replace_with must not panick");
        }
    }
    let guard = PanicGuard;
    unsafe {
        let value = ptr::read(val);
        let value = f(value);
        ptr::write(val, value);
    }
    mem::forget(guard);
}

(Taken from one of my personal project)

ssomers

comment created time in 2 months

PR opened rust-lang/rust

Display elided lifetime for non-reference type in doc

In edition 2018 we encourage writing <'_> explicitly, so rustdoc should display like such as well.

Fixes #75225

Somehow when I run the compiled rustdoc using cargo +stage2 doc on other crates, it correctly produces <'_>, but I couldn't get the std doc to do the same with ./x.py doc --stage 2. Might this be related to the recent change to x.py about how the doc is built?

+48 -10

0 comment

3 changed files

pr created time in 2 months

push eventnbdd0121/rust

Joshua Nelson

commit sha 99f34d814e87e33e014433f791a13db3a3bd2273

Remove warnings

view details

Joshua Nelson

commit sha e78d499637761efceebf6f9cb8ab317a31541ec7

Add test for re-exports I had a hard time getting this to work without the `extern crate`, suggestions are welcome.

view details

Joshua Nelson

commit sha 9eb63945eb02b67e3edf4a7214c3148bffa49ed2

Add test for documenting the re-export

view details

Joshua Nelson

commit sha 71fe8f7cd8afa71892cb45046b11d0d3f53526a9

Add test for submodules in inner crate

view details

Joshua Nelson

commit sha 432b0431ab0f087a6511c1f8b71c3837cb62237e

Move import to top of function

view details

Joshua Nelson

commit sha 769acbaca056aaa4b8ebbf5963806d1a3ee7a9f0

#![deny(intra_doc_resolution_failure)]

view details

Joshua Nelson

commit sha 5f49f55eb4fc73dc89ab80c124b9eb158e51f57b

rand -> my_rand This fixes a failure in stage2 rustdoc tests.

view details

Joshua Nelson

commit sha e63e5cdab02659beec0fd4a50d4b2556b7d6500d

Support intra-doc links on macro re-exports This includes both `macro_rules!` and proc-macros.

view details

Joshua Nelson

commit sha 82b3b0705bfe67ab1565505ae1422f9302e12b6e

Support intra-doc links on trait and module re-exports Trait implementations are treated the same as modules for the purposes of intra-doc links.

view details

Joshua Nelson

commit sha 0ad1dcd6a04759a20b72debae5b114751fe6c7ff

Add more debugging

view details

Joshua Nelson

commit sha 8387e3825fa077b2c2e6d75d65592cb6c19361c1

Add (broken and ignored) test for #73829

view details

Joshua Nelson

commit sha c46e0386c5c3dcd448975cfa551b93045b013ce4

Fix invalid lint intra_doc_resolution_failure is not a lint.

view details

Nicholas Nethercote

commit sha 9f0080801da75c596cd8548ffb539bb8f046fa62

Remove `ExtCtxt::ident_of`. It's equivalent to `Ident::from_str_and_span`. The commit also introduces some more static symbols so that `Ident::new` can be used in various places instead of `Ident::from_str_and_span`. The commit also changes `Path::path` from a `&str` to a `Symbol`, which then allows the lifetime annotation to be removed from `Ty`. Also, the use of `Symbol` in `Bounds` removes the need for its lifetime annotation.

view details

Nicholas Nethercote

commit sha 002af4d0c7aac6607ca4e0a6629ab679df20aeac

Avoid storing `SymbolStr` in a struct. It's intended only for very temporary use.

view details

Nicholas Nethercote

commit sha f03c7f83eb72d44077f03b8140768eefb60150a0

Add `UnsafetyViolationDetails`. This replaces the need for the `description` and `details` symbols in `UnsafetyViolation`, which are static. As a result some `Symbol::as_str()` calls are no longer necessary, which is nice.

view details

Nicholas Nethercote

commit sha 62db617e401487f7b4b5d2d19591b16c7339d131

Avoid storing `SymbolStr` in a struct. It's intended only for very temporary use.

view details

Nicholas Nethercote

commit sha a4ba18164a70d61eeed5b36a4cdcc6ed523a7d55

Remove some `Symbol:as_str()` calls.

view details

Lokathor

commit sha e190bdf710101d8fdf12195dcc73749719a57e72

fill in all those options.

view details

Aman Arora

commit sha 50f3dbd1214fb9e582b845a364fc4746622e96a0

Move hir::Place to librustc_middle/hir Needed to support https://github.com/rust-lang/project-rfc-2229/issues/7 Currently rustc_typeck depends on rustc_middle for definition TypeckTables, etc. For supporting project-rfc-2229#7, rustc_middle would've to depend on rustc_typeck for Place -- introducing a circular dependcy. This resembles the MIR equivalent of `Place` located in `lbrustc_middle/mir`. Co-authored-by: Aman Arora <me@aman-arora.com> Co-authored-by: Jennifer Wills <wills.jenniferg@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>

view details

Kristofer Rye

commit sha ab23a2a9c54fed2acbd553407a761f19af6e8ed4

ci: Set `shell: bash` as a default, remove duplicates A follow-up to #74406, this commit merely removes the `shell: bash` lines where they are explicitly added in favor of setting defaults for *all* "run" steps. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>

view details

push time in 2 months

issue commentrust-lang/rust

rustdoc doesn't show explicit elided lifetimes in function signatures

@rustbot claim

Nemo157

comment created time in 2 months

pull request commentrust-lang/rust

Make `IntoIterator` lifetime bounds of `&BTreeMap` match with `&HashMap`

What I am suggesting is that this may be an issue with the compiler and we might want to fix that instead.

canova

comment created time in 2 months

pull request commentrust-lang/rust

Make `IntoIterator` lifetime bounds of `&BTreeMap` match with `&HashMap`

I don't quite understand the reason why K: 'a, V: 'a would make a difference here, isn't this implied because that's needed for &'a BTreeMap<K, V> to be well-formed?

canova

comment created time in 2 months

issue commentrust-lang/rust

Borrow compilation error with `vec.swap(0, vec.len() - 1)`, while `vec.push(vec.len())` works.

Will Polonius be able to fix it?

No. As I mentioned earlier, the desugared code will use a mutable borrow before an immutable one, so this code should not compile, otherwise it is unsound in general. To make NLL work across autoderef would likely be a langauge-level major change because the compiler'll need to move the location of autoderef.

marcospb19

comment created time in 2 months

issue commentrust-lang/rust

Typechecker doesn't honor Deref as a trait bound on references when using * operator

Sound plausible, but as you said this could potentially be expensive. I am not sure if this would needs a lang-team approval though. cc @nikomatsakis

@rustbot modify labels: +A-traits +T-lang

djrenren

comment created time in 2 months

issue commentrust-lang/rust

Hide Cow implementation details

We could reduce Cow memory usage like beef::Cow by teach rustc to leverage padding field for enum tagging.

This is not achievable I believe, because padding can be written to freely by codegen.

pickfire

comment created time in 2 months

issue commentrust-lang/rust

[ER] Possible basic panic_bounds_check left after Vec::resize_with

This generates some more bizarre code:

pub fn foo() -> Vec<usize> {
    let mut arr: Vec<usize> = vec![];
    arr.resize_with(100, || Default::default());
    assert_eq!(arr.len(), 100);
    for i in 0 .. 100 {
        arr[i] = i;
    }
    arr
}

generates code for assert_eq!:

test    r14, r14
jne     .LBB3_2

This is likely a LLVM bug.

@rustbot modify labels: +A-codegen +A-LLVM +C-enhancement +I-slow +I-heavy

leonardo-m

comment created time in 2 months

PR opened rust-lang/triagebot

New way of performing set_assignee

Try to assign regardless if the user is in the repo assignee list, and check whether it is successful. If so, remove all other assignees.

This would allow "outside contributers" to be assigned if they have commented the issue.

NOTE: I have tested the API usage and type-checked this PR, but haven't tested the bot (seems non-trivial to set it up on my dev environment).

Closes #750

+33 -39

0 comment

1 changed file

pr created time in 2 months

push eventnbdd0121/triagebot

Gary Guo

commit sha d412eaf08bfcb16a8e0dab7917dbdbfe3766f5de

New way of performing set_assignee Try to assign regardless if the user is in the repo assignee list, and check whether it is successful. If so, remove all other assignees. This would allow "outside contributers" to be assigned if they have commented the issue.

view details

push time in 2 months

issue openednbdd0121/test-repo

Test

created time in 2 months

created repositorynbdd0121/test-repo

created time in 2 months

issue commentrust-lang/triagebot

Assignment for non-org members

Oh, I checked the source code, it seems that it is an incorrect use of the API.

https://github.com/rust-lang/triagebot/blob/77ea0f439501f127e1b682dd5082fabf8a7fa68e/src/github.rs#L514 This only checks if an user can be assigned to any issue of the repository, rather than a particular issue.

nbdd0121

comment created time in 2 months

issue openedrust-lang/triagebot

Assignment for non-org members

Currently rustbot assigns itself for @rustbot claim by users without permission, I believe this is due to the API returning error when a non-org member is assigned, so I emailed GitHub support about this issue:

Gary Guo: Jun 22, 2020, 11:03 PM UTC

In the UI (https://help.github.com/en/github/managing-your-work-on-github/assigning-issues-and-pull-requests-to-other-github-users): You can assign up to 10 people to each issue or pull request, including yourself, anyone who has commented on the issue or pull request, anyone with write permissions to the repository, and organization members with read permissions to the repository. For more information, see "Access permissions on GitHub."

In the API (https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue): NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.

So people who has commented on the issue or pull request can be assigned in the UI but not the API. Is this inconsistency intentional? This is very confusing.

Laurel (GitHub Support): Aug 5, 2020, 7:17 PM UTC

Hello Gary,

Thank you for contacting GitHub support. Sorry for the delay in responding to this issue. I confirmed that you can add users who have commented on an issue as an assignee both in the UI and via the API. The note in the API is in reference to the permissions required to be able to add an assignee, not the permissions needed to be an assignee. Please let me know if there is anything else I can help you with.

Kind regards, Laurel

However it seems that this is different from what we experience, because an user who posted @rustbot claim certainly would have commented on that issue. Could someone confirm that we are currently indeed not being able to assign users who have commented on an issue as an assignee?

created time in 2 months

issue commentrust-lang/rust

Mapping and collecting an owned `Vec` to an item with the same size should reuse its allocation

What you have is not safe.


#[repr(u8)]
#[derive(Debug)]
enum Test {
    A = 1,
    B = 2,
}

impl Drop for Test {
    fn drop(&mut self) {}
}

let v = vec![Test::A, Test::B];
let v2 = v.map_in_place(|x| match x {
    Test::A => 0u8,
    Test::B => panic!(),
});

Miri gives:

error: Undefined Behavior: enum value has invalid tag: 0x00
jhpratt

comment created time in 2 months

issue commentrust-lang/rust

Allow specifying function alignment

I believe you would need to use assembly for interrupt handlers because naked functions don't work as intended anyway.

repnop

comment created time in 2 months

issue commentrust-lang/rust

Mapping and collecting an owned `Vec` to an item with the same size should reuse its allocation

Vec::map_in_place was unstable before Rust 1.2.0, deprecated in Rust 1.3.0 and removed since.

You might want to use something like https://docs.rs/map_in_place.

jhpratt

comment created time in 2 months

issue commentrust-lang/rust

multiple mutable borrow error with get_mut

use std::collections::HashMap;

pub fn find<'a>(lookup: &HashMap<u32, usize>, items: &'a mut Vec<u32>, id: u32) -> Option<&'a mut u32> {
    if let Some(token) = lookup.get(&id) {
        return items.get_mut(*token);
    }

    if let Some(token) = lookup.get(&id.wrapping_add(1)) {
        let item = items.get_mut(*token)?; // <- 2. Therefore this lifetime of this borrow of `items` is exactly 'a, not a shorter, temporary lifetime.
        if *item == id {
            return Some(item); // <- 1. This line requires item: 'a
        }
    }

    if let Some(token) = lookup.get(&(id.wrapping_sub(1))) {
        let item = items.get_mut(*token)?; // <- 3. Because 2 already requires the lifetime to be borrowed for entirety of 'a, this is no longer allowed.
        if *item == id {
            return Some(item);
        }
    }

    None
}
95th

comment created time in 2 months

push eventsuisei-cn/ayt-translator

dependabot[bot]

commit sha 6adca00f60adc28be0753b4f87771b9f663f07d7

Bump elliptic from 6.5.2 to 6.5.3 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 2 months

PR merged suisei-cn/ayt-translator

Bump elliptic from 6.5.2 to 6.5.3 dependencies

Bumps elliptic from 6.5.2 to 6.5.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/8647803dc3d90506aa03021737f7b061ba959ae1"><code>8647803</code></a> 6.5.3</li> <li><a href="https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"><code>856fe4d</code></a> signature: prevent malleability and overflows</li> <li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+6 -6

0 comment

1 changed file

dependabot[bot]

pr closed time in 2 months

issue commentrust-lang/rust

Add a "clear terminal" function to standard.

This is something that other languages have by default

This is invalid. Not C/C++, Go, Java, Python or most languages.

The only language I am aware that have built-in clear function is JavaScript, but that's mostly because when API of console was originally designed, it's used by browsers which control the presentation of console messages. This is not true for CLI.

sHaDoW-54

comment created time in 2 months

issue commentrust-lang/rust

Is RawVec still necessary?

Currently Box<[MaybeUninit<T>]> is constructed using a RawVec. https://doc.rust-lang.org/1.45.1/src/alloc/boxed.rs.html#277-279

Plecra

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 2cfcc0c65c4642400305823994f0c6b021c4b53a

Fix regionck failure when converting Index to IndexMut

view details

Gary Guo

commit sha 000f5cdd24be7067c3294e1fba2da4a3e88dd849

Add UI test for issue 74933

view details

push time in 2 months

issue commentrust-lang/rust

Lifetime error when indexing with borrowed index in beta but not in stable

@oli-obk This issue is not related to anonymous lifetime actually, if you spell out the lifetime explicitly it's still the same. The root cause has been identified and that line actually is the culprit, a detailed analysis can be found in #74960.

rodrimati1992

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha c34a5e3350b16dae20440be8230c41f117f677c4

Fix regionck failure when converting Index to IndexMut

view details

Gary Guo

commit sha b02e3e3d31f994c1d3589baf95918b426648e103

Add UI test for issue 74933

view details

push time in 2 months

Pull request review commentrust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

 impl IndexMut<u32> for H { }  fn main() {-    H["?"].f(); //~ ERROR mismatched types+    H["?"].f();+    //~^ ERROR mismatched types+    //~| ERROR mismatched types

I am currently seeking a way not to do any demand_coerce at all. If that's not possible (or would be too complex), I'll update the PR to use demand_coerce_diag.

nbdd0121

comment created time in 2 months

Pull request review commentrust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

 impl<'a, 'tcx> FnCtxt<'a, 'tcx> {              match expr.kind {                 hir::ExprKind::Index(ref base_expr, ref index_expr) => {-                    // We need to get the final type in case dereferences were needed for the trait-                    // to apply (#72002).-                    let index_expr_ty = self.typeck_results.borrow().expr_ty_adjusted(index_expr);

I am not sure if there is a way to retrieve the input_ty in try_index_step. If we could we could just use it as index_expr_ty.

nbdd0121

comment created time in 2 months

Pull request review commentrust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

 impl<'a, 'tcx> FnCtxt<'a, 'tcx> {              match expr.kind {                 hir::ExprKind::Index(ref base_expr, ref index_expr) => {-                    // We need to get the final type in case dereferences were needed for the trait-                    // to apply (#72002).-                    let index_expr_ty = self.typeck_results.borrow().expr_ty_adjusted(index_expr);

Ok, I narrowed down the issue to this line. This will cause the actual type (and lifetime) of index expression to be used, rather than a supertype of it.

nbdd0121

comment created time in 2 months

push eventnbdd0121/rust

Gary Guo

commit sha 233285d37c8444f5f1eb92865a35cf4894977f96

Add UI test for issue 74933

view details

Gary Guo

commit sha b133b197dc6bbd90c1024798b1fe903313f315fb

Fix broken test case

view details

push time in 2 months

pull request commentrust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

Ideally we don't really want to do a re-infer and re-coerce because we could be able to re-use the result from immutable indexing, but somehow the existing code doesn't work...

nbdd0121

comment created time in 2 months

PR opened rust-lang/rust

[WIP] Fix regionck failure when converting Index to IndexMut

Fixes #74933

r? @ghost

+12 -9

0 comment

1 changed file

pr created time in 2 months

issue commentrust-lang/rust

Lifetime error when indexing with borrowed index in beta but not in stable

Okay, this is an issue near convert_place_op_to_mutable. Just re-infer the index type and re-do the coercion is sufficient to fix the regionck failure (https://github.com/nbdd0121/rust/commit/375a6d073b5944fecc7ca48c0e7ff53154180b2c).

However I am not sure why the existing code does not work. This piece of code is last touched in #72068. cc @estebank @oli-obk do you have any clue why the existing approach does not work well with regionck?

rodrimati1992

comment created time in 2 months

create barnchnbdd0121/rust

branch : typeck

created branch time in 2 months

issue commentrust-lang/rust

Lifetime error when indexing with borrowed index in beta but not in stable

This code compiles in Rust 1.17 but not in Rust 1.18+:

use std::ops::{Index, IndexMut};

pub struct T;
impl T {
    fn test(&mut self) {
    }
}

pub struct FieldMap;

pub fn insert<'a, 'b>(this: &'a mut FieldMap, field: &'b Field<'a>) -> () {
    this[field].test();
}

pub struct Field<'a> {
    x: &'a T,
}

impl<'a> Index<&'a Field<'a>> for FieldMap {
    type Output = T;

    fn index(&self, _: &'a Field<'a>) -> &T {
        unimplemented!()
    }
}

impl<'a> IndexMut<&'a Field<'a>> for FieldMap {
    fn index_mut(&mut self, _: &'a Field<'a>) -> &mut T {
        unimplemented!()
    }
}

#72280 unifies DerefMut/IndexMut to use the "fix-up" path originally used when performing method calls, so it broadens the bug to assignments as well.

rodrimati1992

comment created time in 2 months

issue commentrust-lang/rust

Lifetime error when indexing with borrowed index in beta but not in stable

Will look into this today.

@rustbot claim

rodrimati1992

comment created time in 2 months

PR opened rust-lang/rust

Improve diagnostics when constant pattern is too generic

This PR is a follow-up to PR #74538 and issue #73976

When constants queries Layout, TypeId or type_name of a generic parameter, instead of emitting could not evaluate constant pattern, we will instead emit a more detailed message constant pattern depends on a generic parameter.

+15 -9

0 comment

3 changed files

pr created time in 2 months

push eventnbdd0121/rust

Caio

commit sha 187aea7c34adf06b0db39f688d60d3fdac8e7e3e

Impl Default for ranges

view details

flip1995

commit sha f7acea2683c6124854bfe20e7127e4dfba344d3e

Register redundant_field_names and non_expressive_names as early passes

view details

flip1995

commit sha 485229c4a3d6a2fbe40f5a6976a33144a27497c6

Fix fallout in redundant_field_names

view details

flip1995

commit sha efd3dcff97f67f376e354c047133ce9044c52991

Fix fallout in similar_names

view details

Eduardo Broto

commit sha bb37a0f948b02e6434dbe3ea615960052d37f784

Avoid triggering similar names on code from expansion

view details

Alexis Bourget

commit sha 2853448426ce76926baa7e6e6173c15228e4951a

Document the ref keyword

view details

Alexis Bourget

commit sha 249e07b237bd3049eb7fd94afe450b7c09b6a3d9

Short documentation for the false keyword

view details

Stefan Lankes

commit sha 6813c1c69baf870a479c70e23ad0550d1d9aa9be

revise RwLock, which is derived from the wasm implementation - increasing the readability of `Condvar` - simplify the interface to the libos HermitCore

view details

Stefan Lankes

commit sha 3acc3ef10d2099a4b3118e8c705b36f4bbaf6f64

minor changes to pass the format check

view details

Stefan Lankes

commit sha beb1b1fa5b1047c7caf8a1d499725df3c1ad8cad

reorder crates to pass the format check

view details

Stefan Lankes

commit sha f9c609164251abc136eb9bda55c92cb99adb5c86

remove some compiler warnings

view details

Trevor Spiteri

commit sha 6dfe144bdd4413ac55cbb2ad2edfb1daa0c4bf15

stabilize const_nonzero_int_methods

view details

Trevor Spiteri

commit sha 9739b512a892628534e730ffcd9756b3218c8de8

stabilize some const_checked_int_methods

view details

Trevor Spiteri

commit sha c1c674c2dbfe3f6dc47d11368c1b5ee4ab008799

stabilize const_saturating_int_methods

view details

Trevor Spiteri

commit sha 056d925167318636fcf975c8ffb81efebdc9bca3

stabilize const_int_sign

view details

Trevor Spiteri

commit sha 2a84e313df095fd0e81b9348b68bd9b1d1caa551

stabilize const_ascii_ctype_on_intrinsics

view details

Adam Perry

commit sha d275739c09f266479d6db388cbf55ba6ca791b9d

Derive common traits for panic::Location. Add documentation about the host/target behavior of Location::file.

view details

Jamie Cunliffe

commit sha fc52b47e8013da325fc0a0f5d3897143243ba206

va_args implementation for AAPCS. Implement the va args in codegen for AAPCS, this will be used as the default va_args implementation for AArch64 rather than the va_args llvm-ir as it currently is. Copyright (c) 2020, Arm Limited.

view details

Alexis Bourget

commit sha 837a761b398a6ff6a97f7f61e390dae9efbeab79

Document the where keyword

view details

Andrey Zgarbul

commit sha 7d4a92d4f8dc03409984695d78893fffdd3ff1f9

remove LengthAtMost32 on AsRef/Borrow impl for array

view details

push time in 2 months

pull request commentrust-lang/rust

Improve slice.binary_search_by()'s best-case performance to O(1)

@pickfire you called std_binary_search_by in stdnew_binary_search, it should be stdnew_binary_search_by.

Folyd

comment created time in 2 months

issue commentrust-lang/rust

Permissions::readonly() doesn't behave as expected with files

I think it's currently not clear because I interpreted this as "read-only to the calling users context" so making the documentation explicit in what occurs behind the scenes would be good.

But the doc does not mention about user at all? Permissions is retrieved from Metadata, which describes the nature about a file itself rather than how it can be interacted with.

Firstyear

comment created time in 2 months

issue commentrust-lang/rust

Permissions::readonly() doesn't behave as expected with files

Permissions::readonly does not (and cannot) perform any I/O operation to determine if the file is actually readable. It can only peek into the platform-specific permission representation (which is the "777" format on Unix). It also does not encode any information about current user or group, so it couldn't even check if you are the current user/group.

I think the usage of name "read-only" is pretty clear that it implies nobody could write to it, not that the current user cannot write to it (as in read-only file system), but we could possibly improve the documentation to make it clearer.

@rustbot modify labels: +T-doc +C-enhancement -C-bug

Firstyear

comment created time in 2 months

issue commentrust-lang/rust

Endless loop in std::fmt caused by initializing WriteLogger twice

This is not a bug in libstd. It is visible that a non-std call frame (<ctrlc:::Error as core::fmt::Display>::fmt) is the culprit.

LionsAd

comment created time in 2 months

issue commentrust-lang/rust

println! incorrectly prints lines from files using CRLF

If you don't want to keep the CR, consider using https://doc.rust-lang.org/std/primitive.str.html#method.lines which trims the CR away for you.

Naxane

comment created time in 2 months

issue commentrust-lang/rust

println! incorrectly prints lines from files using CRLF

Your file uses CRLF as the line ending, and you only split with \n, so this is expected behaviour.

Naxane

comment created time in 2 months

more