News for hackers. Stuff that matters.
Re:Rust 1.100.0 by iknowstuff on Thursday November 12, 2026 @01:50PM (#50472228)
Re:Rust 1.100.0 by entropicdrifter on Thursday November 12, 2026 @01:56PM (#50472335)
You are the hero we needed, today. Thank you
Re:Rust 1.100.0 by Kinrany on Thursday November 12, 2026 @02:03PM (#50472454)
@dang
Re:Rust 1.100.0 by dwb on Thursday November 12, 2026 @02:10PM (#50472567)
This doesn’t do anything.
Re:Rust 1.100.0 by lukax on Thursday November 12, 2026 @02:40PM (#50473045)
Yes, it does. It triggers some people who then post a reply to write an email to [email protected]
Re:Rust 1.100.0 by arcanemachiner on Thursday November 12, 2026 @02:51PM (#50473188)
This site doesn't even fully support Markdown or Unicode and people think for some reason that Twitter-style username tagging will actually work. U+1F923
Re:Rust 1.100.0 by Kinrany on Thursday November 12, 2026 @06:13PM (#50475774)
I don't know, the comments did get moved ¯\_(ツ)_/¯
Re:Rust 1.100.0 by orthecreedence on Thursday November 12, 2026 @03:55PM (#50474136)
Yes, you need to use all caps @DANG
Re:Rust 1.100.0 by n_u on Thursday November 12, 2026 @02:10PM (#50472574)
> Cargo now reports unused dependencies to users, e.g.

> warning: unused dependency `tracing-subscriber` --> Cargo.toml:23:1 | 23 | tracing-subscriber.workspace = true | ^^^^^^^^^^^^^^^^^^ | = note: `cargo::unused_dependencies` is set to `warn` by default help: consider removing the dependency on `tracing-subscriber`

Heck yes

Re:Rust 1.100.0 by minimaxir on Thursday November 12, 2026 @03:02PM (#50473354)
I updated to 1.100 during a Claude session and it complained about new warnings, so I told it to fix them. It removed a large number of unused dependencies without issue.
Re:Rust 1.100.0 by minimaxir on Thursday November 12, 2026 @09:21PM (#50477270)
I am legitimately confused why my parent comment is being mass downvoted: the point I was making is that this is change is more a perk for agent use with Rust since agents typically will resolve warnings by solving the issue (and therefore proactively remove redundant dependencies)
Re:Rust 1.100.0 by yuriks on Thursday November 12, 2026 @09:49PM (#50477478)
fwiw my immediate reaction (I didn't downvote) to your comment was "no one asked".
Re:Rust 1.100.0 by minimaxir on Thursday November 12, 2026 @09:55PM (#50477532)
My intent was to share a fun anecdote of an practical, unexpected impact of the change but I now see that agents + fun is still a tough sell on HN.
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @11:23PM (#50478301)
I shared your anecdote with another Cargo team member who helped work on this feature. We appreciate seeing how what we made helped people!
Re:Rust 1.100.0 by minitech on Thursday November 12, 2026 @11:40PM (#50478426)
There’s nothing fun about that anecdote, and nothing technically interesting about agents being able to do sed-level tasks. (I’m sorry for the negative comment, but it didn’t seem ideal for you to come away from this experience with the impression that “I now see that agents + fun is a tough sell on HN” suggests.)
Re:Rust 1.100.0 by MindSpunk on Thursday November 12, 2026 @10:11PM (#50477677)
Confuses me too. Maybe they just stopped reading after the first sentence and assumed you were complaining about new warnings?
Re:Rust 1.100.0 by psnehanshu on Friday November 13, 2026 @02:09AM (#50479488)
How do you guys know when your comment is downvoted? I seem to be missing something in Hacker News.
Re:Rust 1.100.0 by nexawave-ai on Friday November 13, 2026 @03:05AM (#50479952)
You must have a certain amount of Karma, then you'll be able to downvote comments. I dont know what that amount is though, I'm on 50 karma points and I dont have that feature enabled
Re:Rust 1.100.0 by latexr on Friday November 13, 2026 @06:13AM (#50481871)
> You must have a certain amount of Karma, then you'll be able to downvote comments

That’s not what they’re asking, they want to know how people know their own comments were downvoted. The answer is that you can look at your own points in your own comments.

> I dont know what that amount is though

501.

Re:Rust 1.100.0 by exographicskip on Friday November 13, 2026 @01:20PM (#50487550)
[delayed]
Re:Rust 1.100.0 by latexr on Sunday November 15, 2026 @05:46AM (#50505863)
Your account, like your comments, starts at 1 karma (not 0). In that sense, 501 is once you earn 500 karma, which is a round number.
Re:Rust 1.100.0 by m-s-y on Saturday November 14, 2026 @11:05AM (#50498110)
close to 250 here and same. no downvote option.
Re:Rust 1.100.0 by dns_snek on Friday November 13, 2026 @04:46AM (#50480847)
[delayed]
Re:Rust 1.100.0 by steveklabnik on Friday November 13, 2026 @11:15AM (#50485675)
Comments that go below one karma are made an increasingly light shade of grey.
Re:Rust 1.100.0 by nightpool on Friday November 13, 2026 @02:32AM (#50479656)
I think most people (rightly or not) feel pretty negatively about the concept of a project having hundreds of unused dependencies. If you've lost track of your codebase to such an extent as that, you should probably expect a little bit of social pushback from people who pride themselves on understanding their code and being responsible for it. It's just a fundamentally different and in some ways upsetting mindset to the average programmer.
Re:Rust 1.100.0 by saghm on Thursday November 12, 2026 @09:33PM (#50477372)
My semi-controversial take is that the best way to use agents for Rust is to literally turn every possible lint and warning on in clippy and require that they're treated as blocking for the agent to fix before ever saying things are done. While a few of them might be overzealous and feel tedious to work around manually, there's no need to care about it being tedious for an agent!
Re:Rust 1.100.0 by skavi on Friday November 13, 2026 @02:59AM (#50479903)
clippy lints are not universally good to follow. and with the pedantic set enabled, you quickly have bad clippy advice forcing a bunch of ugly expects in your code.

the default set plus a selection of whatever you like from the rest works better.

Re:Rust 1.100.0 by saghm on Friday November 13, 2026 @01:20PM (#50487549)
I was pretty explicitly talking about LLM-generated code. At the end of the day, you're either reviewing the code it outputs or you're not. If you are, I'd argue that you're going to be getting a bunch of ugly things in your code that you're going to want to clean up anyhow, and the tradeoff of having everything enabled is well worth it compared to what an LLM will generate with more relaxed lints. If you're not, I don't think you particularly need to care about "ugly" code.
Re:Rust 1.100.0 by derefr on Saturday November 14, 2026 @01:38PM (#50499543)
Yeah, but the point about boxing large variants still stands. That's not about aesthetics/readability, that's about micro-perf (e.g. cache-coherence), and potentially safety / atomicity. (And it can even be about compatibility, if you're doing it across an ABI boundary.)
Re:Rust 1.100.0 by jtwaleson on Thursday November 12, 2026 @03:39PM (#50473921)
Does this remove the need for machete or shear?
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @04:11PM (#50474333)
I believe so. The maintaner of cargo-udeps did most of the work as an effort to upstream it.

The main limitation is in dev-dep detection since there isn't a way to exhaustively run everything that uses dev-deps yet. You can look at logging statements to get an approximation though.

Re:Rust 1.100.0 by ustad on Thursday November 12, 2026 @02:23PM (#50472771)
“Never type” - Feel like I’m stupid for not having a clue what that means.
Re:Rust 1.100.0 by pkulak on Thursday November 12, 2026 @02:26PM (#50472814)
A few other langs have it too. It's just something to return when no return is actually possible. And then it can propagate, so it makes some nice things possible that weren't before.
Re:Rust 1.100.0 by igravious on Thursday November 12, 2026 @02:59PM (#50473307)
Without looking up the Rust implementation I would hazard a guess that it is loose language to say "something to return when no return is actually possible" because if it is anything like the Bottom Type then there is no something that is being returned which is what this function signature indicates. Generally used for exception handling or intentional infinite loops (in both cases the function does not return from whence it came) … please correct me if I'm wrong here …
Re:Rust 1.100.0 by kibwen on Thursday November 12, 2026 @04:11PM (#50474336)
Basic use cases like that have always been possible in Rust, either via defining your own enum with zero variants (`enum Foo {}`), or by using a function return type of `!` which was hardcoded to work for certain things, e.g. infinite loops. What this release does is generalizes it so that `!` can participate in types in general, and the coolest part is that pattern matching is aware of this, so for example if you have a `Result<u8, !>` where the error variant is impossible, a `match` over this would allow you to omit the impossible error arm, and furthermore because this enum now effectively only has a single variant, it would allow you to use the pleasant irrefutable destructuring assignment syntax `let Ok(foo) = blah();`.
Re:Rust 1.100.0 by afdbcreid on Thursday November 12, 2026 @04:21PM (#50474464)
It has existed as a real type for a very long time (I believe in the beginning it really wasn't a real type but that's a long time ago), you just weren't allowed to name it. There was also an (unsupported) hack that allowed you to use it on stable.
Re:Rust 1.100.0 by anamexis on Thursday November 12, 2026 @02:26PM (#50472818)
Re:Rust 1.100.0 by LoganDark on Thursday November 12, 2026 @02:49PM (#50473171)
It's the type called "!", or the return value of diverging control flow, such as infinite loops, returns or function calls that panic or abort. It's an uninhabited type, meaning no values can actually exist, and that any code that would encounter such a value is unreachable.
Re:Rust 1.100.0 by Xirdus on Thursday November 12, 2026 @03:04PM (#50473385)
Mathematically, types are sets of possible values.

Any type (like in TypeScript; Rust doesn't have one) is a set of every possible value; a supertype of all types. Every expression regardless of type can be assigned to a variable of type any.

The opposite is the never type, which is an empty set; no value is of type never. Per set theory, an empty set is a subset of every set, which makes the never type a subtype of all types. An expression of type never can be assigned to every variable regardless of type.

If never type has no values, then how can an expression have never type? Easy: it must never evaluate. Infinite loops, unconditional panics/exceptions, process exit/abort, etc. Also, generics - you can have Vec<!> that's always empty, Result<T,!> that can never be an error, etc.

Re:Rust 1.100.0 by boston_clone on Thursday November 12, 2026 @03:29PM (#50473739)
[delayed]
Re:Rust 1.100.0 by rcxdude on Thursday November 12, 2026 @04:15PM (#50474393)
Rust does have https://doc.rust-lang.org/std/any/trait.Any.html but it's not quite the same thing (for one thing, it's not actually all types).
Re:Rust 1.100.0 by afdbcreid on Thursday November 12, 2026 @04:19PM (#50474437)
Also called top and bottom types, for this reason.
Re:Rust 1.100.0 by steveklabnik on Thursday November 12, 2026 @04:31PM (#50474591)
Any is not a top type and ! is not a bottom type, actually. They are sort of similar from a lay perspective if you squint, though.
Re:Rust 1.100.0 by afdbcreid on Thursday November 12, 2026 @05:00PM (#50474931)
Why not? I mean if you refer to Rust specifically, yes, because there is no subtyping except for lifetimes, only coercion (and `Any` also cannot contain any type). But in general, why not?
Re:Rust 1.100.0 by steveklabnik on Thursday November 12, 2026 @05:14PM (#50475106)
I am speaking about Rust specifically, yes.
Re:Rust 1.100.0 by NooneAtAll5 on Thursday November 12, 2026 @03:26PM (#50473700)
noreturn, basically
Re:Rust 1.100.0 by sixthDot on Friday November 13, 2026 @07:03AM (#50482311)
yeah aka the bottom type , but "never return" is inisde the type system (a bit like D handles that) while "noreturn" is an attribute. That's basically the two known possible ways of expressing that a call will never return.
Re:Rust 1.100.0 by yccs27 on Thursday November 12, 2026 @04:07PM (#50474283)
As in, values of this type can never actually exist.
Re:Rust 1.100.0 by saghm on Thursday November 12, 2026 @09:56PM (#50477553)
It's the type of what you get back from a `panic!` (a value you never actually get back).
Re:Rust 1.100.0 by dang on Thursday November 12, 2026 @03:22PM (#50473642)
Ok, we've moved the comments to https://news.ycombinator.com/item?id=50472038, which has that URL. Thanks!