Timo

Results 170 comments of Timo

Some things that I was struggling to understand after working with JavaScript for a long time: - Sharing values: in JS, it's all a single thread, so sharing values just...

Not sure if this helps at all, but Node.js exposes APIs for measuring CPU time (sort of). `process.cpuUsage()` returns CPU time used by the process, in microseconds. It's possible to...

I'm guessing the [`needless_doc_test_main`](https://github.com/rust-lang/rust-clippy/blob/10136170fe9ed01e46aeb4f4479175b79eb0e3c7/clippy_lints/src/doc/needless_doctest_main.rs#L41) lint needs to do what rust-lang/rust#121487 did for rustfmt, since it tries to parse doc test code in a new compiler session without using `run_compiler`. Cc...

For reference, MCVE: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d488b7ddbb3ad540da9be8267c0e10f7

Nice, it's probably better to wait for the proper, more comprehensive fix then, I agree. Thanks!

Not sure I understand. `needless_doctest_main` is a normal Clippy lint that *looks at* doc tests (such as the one example I linked), but it is not a test itself. It...

Currently the lint conservatively assumes that it can't lint if any of the parameter's types implement `Drop`, because dropping things isn't supported in `const fn` (ignoring `~const Destruct`, which I'm...

I do wonder what https://github.com/rust-lang/rust-clippy/blob/f5e250180c342bb52808c9a934c962a8fe40afc7/clippy_lints/src/missing_const_for_fn.rs#L154-L158 is for... That seems like dead code essentially. We are early-returning if `already_const` before this, so I don't see how `is_const_fn_raw()` could be true.

Is this change motivated by some kind of "real" example? I think it would be reasonable that users might still want to be warned when macro-generated code uses a disallowed...

> May duplicate #12756 Looks like that fixes it indeed. I ran a clippy build with those changes on the `pgrx-sql-entity-graph` crate and it no longer shows that warning.