Commit graph

8 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
yukang
672e3f4d77 fix #102087, Suggest Default::default() when binding isn't initialized 2022-09-26 07:56:26 +08:00
Esteban Küber
d09851cfba Wording tweak 2022-07-07 12:25:56 -07:00
Esteban Küber
9cb1874cd6 Tweak wording and spans 2022-07-07 12:25:56 -07:00
Esteban Küber
29e2aa12ff On partial uninit error point at where we need init
When a binding is declared without a value, borrowck verifies that all
codepaths have *one* assignment to them to initialize them fully. If
there are any cases where a condition can be met that leaves the binding
uninitialized or we attempt to initialize a field of an unitialized
binding, we emit E0381.

We now look at all the statements that initialize the binding, and use
them to explore branching code paths that *don't* and point at them. If
we find *no* potential places where an assignment to the binding might
be missing, we display the spans of all the existing initializers to
provide some context.
2022-07-07 12:25:55 -07:00
Matthew Jasper
4bf0685cca Evaluate borrow and struct expressions in into
This fixes some ordering problems around assignment expressions.
2019-11-11 22:06:54 +00:00
Alexander Regueiro
022d9c8eb5 Fixed grammar/style in error messages and reblessed tests. 2019-09-06 03:46:08 +01:00
Matthew Jasper
8eef102270 update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
Renamed from src/test/ui/borrowck/borrowck-init-in-fru.ast.nll.stderr (Browse further)