►
From YouTube: Petrochenkov reviews the name resolution code
Description
No description was provided for this meeting.
If this is YOUR meeting, an easy way to fix this is to add a description to your video, wherever mtngs.io found it (probably YouTube).
A
Okay,
so
today
we
are
honored
to
have
flooding
patink
off
the
petrocheek
off
the
expert
on
the
rust
name.
Resolver
join
us
and
he's
going
to
give
us
a
tour
of
the
code
for
the
rusty
name,
resolver
budding.
Thank
you
very
much
for
joining
us
and
welcome.
B
B
Okay,
then,
I
will
start
so
the
majority
of
code
that
resolved
names
in
rust
c.
It
can
be
found
in
the
rest
series
of
way,
but
it's
not
all
of
it,
because
name
resolution
happens
in
many
places
and
but
many
times,
if
you
can
classify
the
name
resolution
cases,
you
can
see
that
there
are
four
three
or
even
five
name
spaces.
B
Type
value
and
marker,
which
are
regular
name
spaces
with
paths
and
also
two
main
spaces
are
for
lifetimes
and
for
labels,
and
those
two
are
labels
are
resolved.
Also
here.
C
B
Russia
all
but
lifetimes,
I
started
the
result
somewhere
else
in
rusty
middle,
but
there
is
an
in-progress
pull
request
by
kameen
sure
I
think
which
moves
the
lifetime
resolution
to
rust
series
of
two,
because
there
is
no
fundamental
difference
between
lifetime
resolution
and
puff
resolution
index
scope,
at
least
because
there
are
still
scopes.
B
There
are
names
that
are
looked
up
from
inside
to
our
site,
etc,
etc,
and
together
with
lifetimes,
it
will
all
be
your
series,
and
the
second
large
component
of
name
resolution
is
a
type
related
resolution
where
it's
a
resolution
for
type
relative
for
associated
items
means
either.
Paths
are
with
associated
type
and
some
types
or
method
calls
which
are
resolved
in
a
very
similar
way,
and
all
of
that
happens
when
christ's
arrests
need
that
check.
I
think.
B
But
it's
still
our
second
step
of
name
resolution
main
resolution
is
off
split
into
early
and
late,
but
the
real
late
name
resolution
is
the
type
related
path.
So
it's
kind
of
early
in
the
middle
and
early
main
pass,
then
late
classes,
tabulate.
A
Here,
oh
here,
yes,.
B
Yes,
okay,
so
the
files
that
we
can
see
here
is
libras
is
the
main
file.
It
mostly
contains
data
structures
that
are
used
for
name
resolution,
both
early
and
the
main
class.
That's
called
late
here
and
some
logic
that
is
common
for
both
early
and
main
passive
evolution,
but
not
related
to
diagnostics.
B
Then
we
have,
from
top
to
the
bottom
play
life
times
is
a
lifetime
resolution
r.
That's
probably.
B
Yes,
yes,
yes,
exactly
lifetime
resolution
is
already
moved
to
resolve.
It's
just
performed
after
lowering
to
here
and
not
together
with
the
rest
of
nine
pass
resolution
but
and
the
poor
request
wrong.
I
mean
it's
going
to
move
to
the
same
part
to
the
same
compiler
pass,
not
just
not
just
to
the
same
thing.
B
I
will
not
touch
the
left-hand
resolution
here,
because
very
similar
to
access
levels
is
a
separate
pass.
That
access
levels
has
is
a
separate
pass
that
calculate
reachability
for
different
items
in
the
crate.
So,
for
example,
some
items
may
be
directly
reachable
in
the
direct.
B
Some
items
are
not
directly
reachable
but
cannot
be,
can
be
named
anyway
through
expert
free
experts,
and
this
pass
collects
the
items
that
can
be
either
directly
reachable.
This
is
called
access,
accessibility,
this
success
level,
it's
actually
accessibility
and
it
should
probably
call
it
reachability
or
something
like
that.
Instead,
so
access
level
public
with
items
that
are
directly
reachable
and
access
level
exported
are
items
that
are
reachable
through
re-exports
public
credit.
B
B
A
lot
of
things
are
actually
based
on
this
reachable
set.
For
example,
a
set
of
symbols
that
are
visible
from
the
compiled
binary
is
based
on
this
reachable
set
and
links
like
missing
documentation
and
then
what
else
missing
stability
attributes.
B
They
are
all
based
on
this
virtual
set
because
it's
state
of
sort
of
ice
items
that
are
somehow
public
and
these
are
visible
to
outside
the
upgrade.
So
the
initial
set
is
collected
here.
B
So
we
can
move
to
the
next.
The
next
file
called
build,
reduce
graph.
B
B
B
So
this
large
bus
is
responsible
for
inserting
items
into
asd.
Basically,
that
also
includes
not
only
iced
tea,
but
some
kind
of
iced
tea,
like
structures
for
other
crates.
B
This
is
also
a
separate
isolate,
plus
that
is
responsible
for
finding
used
items
items
that
if
no
path
refers
to
some
item,
then
it
is.
It
is
imported
here,
in
most
cases
in
cases
of
trades,
it's
reported
by
later
past,
because
trades
can
kind
of
broaden
scope
but
used
later
through
left
calls
or
something
like
that.
B
B
It
definition
paths
this
is
a
stable
representation
of
of
definition.
B
B
B
C
A
B
B
B
B
B
For
example,
huge
structures
like
this
like
slightly
above
above.
B
B
B
Yes,
that's
all
about
resolving
microparts
and
also
loading
macros
from
metadata.
B
B
C
Thank
you.
Yes,
I
have
a
question,
but
it
was
a
bit
too
long
to
type,
so
I
prefer
to
speak.
Thank
you
so
much
for
that.
That
was
super
super
useful.
So
I
have
a
question
that
is
kind
of
more
general
like
trying
to
understand
a
little
bit
the
sequence
of
things
and
how
it
works,
because
you
mentioned
diagnostics
a
lot.
So
I'm
just
thinking
if
you
have
a
case
where
you
have
like
you're
trying
to
use
this
type
a
and
type
b,
but
they
don't
exist
right,
so
they
will
never
be
resolved.
C
B
If
you
have
a
path,
for
example,
in
type
position
that
cannot
be
resolved,
then
we
try
to
resolve
it
in
different
ways.
For
example,
in
different
time,
spaces
try
to
find
the
type
of
candidates
among
names
in
scope
and
apply
all
kinds
of
heuristics
and
try
to
find
this
name
and
similar
names,
and
if
we
find
something
very
likely,
then
we
just
substitute
resolution
for
that
likely
resolution
and
use
it,
and
we,
if
we
really
cannot
find
anything,
then
we
just
have
this
thing
called
resolution
error.
B
B
Resolution
error
just
is
just
used
to
silence
all
derived
errors
from
type
checking,
cetera,
et
cetera,
et
cetera,.
B
The
exact
place
where,
where
it
happens,
maybe
maybe
you
can
find
the
function-
called
smart
resolve
buff
somewhere
in
the
grade.
But
I
don't
remember
where
it
is
exactly.
A
A
A
I'm,
oh,
let's
see
here.
A
Yeah,
I
have
a
new
machine
here.
So
pardon
me,
let's
see
wait.
A
B
Yes,
so
we
have
a
path
that
we
want
to
resolve
spawn
of
that
path.
The
path
source
is
a
numeration
that
tells
us.
B
B
B
That
means
we
are
trying
to
resolve
the
name
in
all
namespaces
in
type
namespace,
video
namespace
and
the
background
namespace
and
everything
below
is
also
mostly
diagnostics
or
or
attempts
to
differ
name
a
resolution
to
do
that.
Checking
and
performance
as
a
type
related.
B
So
now
I
will
just
to
try
to
describe
what
I
see
on
the
screen.
We
need
to
go
from
from
the
top
of
the
file.
A
B
B
We
see
some
items
in
sdh,
but
not
all
of
them.
Some
items
can
appear
later
during
expansion.
So
well,
could
you
could
you
freeze,
freezing
screen
and
not
scroll,
okay,.
B
So
when
we
are
resolving
some
macro
path
or
import
path,
we
may
get
no
resolution,
but
that
doesn't
mean
there
is
no
resolution,
because
some
resolution
may
appear
later
if
there
are
some
unexpanded
macros
etc.
So
then
then
resolution
functions
at
this
point,
return
results
and
in
case
of
errors,
no
resolution.
They
also
return
determinancy.
B
This
is
the
set
of
places
where
names
are
looked
up
during
during
resolution.
For
example,
when
we
try
to
find
some
some
in
type
name
space,
we
go
through
one
subset
of
the
scopes
like
module,
then
externally
to
really
standard
library,
fluid
and
then
through
built-in
types,
and
when
we
are
resolving
markers,
then
we
go
through
a
different
subset
of
stops
like
two
kinds.
B
Uh-Huh
landmark
produce
brilliant,
pollute,
regular
standard
library,
pollute
and
registered
attributes
and
ambition.
So
it's
just
a
set
of
places
that
we
need
to
search
names
in
and
below.
We
have
a
scope
set
that
describes
subset
of
these
names,
for
example,
scope
set.
All
namespace
is
a
subset
for
certain
namespace
and.
B
B
A
lot
of
conflicts
like
you
have
a
macro
called
ignore
and
you
have
a
built-in
attribute
called
ignore,
and
now
you
have
a
conflict
and
you
have
some
codes
that
work
before
now
breaks.
So
we
have
to
introduce
this
kind
of
sub-name
space
in
two
name:
spaces
in
the
micro
name
space
and
where,
when
we
are
resolving
a
macra
path,
we
have
to
also
take
the
new
kind
of
that
microgravity.
B
The
parents
called
set
and
describes.
B
B
So
if
you
know
the
module
in
which
this
name
is
located,
then
expansion
id
on
the
macro
that
produced
this
code,
the
current
chain
of
macro
rules
and
also
the
list
of
legacy
derived
helpers,
is
called.
Then
we
can
resolve
any
name,
but
this
doesn't
apply
to
late
resolutions
because
it's
not
not
unified
yet,
but
it
is
enough
to
resolve
most
of
it.
So.
B
Then
we
can
go
through
the
next
enumeration
infiltrate
context.
I
I
don't
remember
what
is
this
exactly.
B
B
Binging
error
is
something
about
diagnostics.
Okay,
this
enumeration
is
many
kinds
of
resolution.
Error
errors
that
then
resolver
can
report.
B
This
is
a
separate
enumeration
for
errors,
invisibility
paths
just
because
visibility
has
have
to
be
resolved
very
early,
so
they
have
to
have
some
great
consideration
for
errors,
but
maybe
that's
a
nice.
I
don't
know.
I
don't
know.
B
No,
no,
no,
no,
no
slightly!
Okay
and
this
lexical
is
called
the
engine
enumeration.
It's
it's
the
same
thing
as
name
binding,
but
it's
an
optimization
the
result
of
path,
resolution
for
or
something
that
may
be
a
local
variable.
B
B
Instead
of
creating
a
full
name
building,
we
just
just
create
some
minimal
messaging
information
like
the
rest
configuration.
B
Another
enumeration
for
results
of
the
main
resolution
fast
that
was
performed
in
later
s.
This
liberation
can
probably
be
unified
with
something
else.
It's
just.
Nobody
has
time
to
do
that.
B
What
is
a
module
in
the
name
resolution?
It's
any
container
for
names
containing
for
items,
so
it's
not
like
a
model
item
in
the
language.
Module
in
in
resolution
sense
is
a
can
be
either
a
regular
module,
but
it
also
can
be
a
block
inside
a
function
because
those
can
contain
items,
and
it
also
be
an
enumeration
and
also
it
right
right.
B
So
this
module
kind
of
makes
a
distinction
between
modules,
item
level,
modules
like
module
items,
enumerations
and
drives
and
block
items,
and
both
modules
inside
functions
that
are
just
the
current
braces.
B
Interesting
module
data
is
just
all
the
information
about
module,
that's
necessary
for
the
resolver,
the
type
module
below
it's
a
reference
type
and
the
module
data
it
lives
on.
In
some
arena
there
is
a
an
arena
that
is
used
by
resolver
and
arena
is
allocated
before
the
resolver
is
created,
and
a
lot
of
data
in
the
resolver
leads,
including
data
for
modules.
B
This
is
kind
of
similar
to
the
arena
for
now
for
high
level
internal
representation
and
maybe
for
hd
in
the
future.
So
some
data
that
leaves
while
there's
all
resolver
is
alive
or
while
here
is
alive
and
can
be
dropped
after
after
revolver
or
hero
no
longer
necessary.
B
B
Here's
the
some
interesting
part
main
binging.
We
have
talked
about
modules
before
module
is
a
container
for
names
and
the
name
binting
is
an
any
name
in
that
container.
B
So
when
we
resolve
some
off
the
result,
is
this
main
building
and
also
modules
contain
name
beams
named
indian
is
an
information
about
the
definition
the
matrix
function
that
produced
this
name
is
visibility
and
also
named
engine
kind
that
determines
whether
it's
import
or
a
proper
item.
B
B
B
B
B
Oh
yes,
here
this
function,
resolved
great
is
an
entry
point
for
the
whole
late
resolution
pass
or
main
resolution
plus
so.
B
These
are
some
functions
for
connecting
tracing
scope,
because
that
related
resolution
uses
sets
of
triton
scope,
resolve
methods
and
also
that
related
paths
too.
B
B
B
B
And
below
we
can
see
logic
for
finding
finding
names
in
modules
in
contain
our
main
containers,
which
is
complicated
by
two
things:
hydrogen
and
indeterminacy,
when
we
are
resolving
names
during
during
expansion
where
trace
asd
is
not
completed.
B
B
B
B
B
A
C
Oh
yeah,
sorry,
my
question
was:
are
the
tests
for
names
like?
Are
there
name
resolver
specific
tests
and
are
they
in
some
different
folders.
B
C
A
Not
question,
but
you
mentioned
at
the
start
of
the
presentation
accessible.
Can
you
tell
us
more
about
how
it
will
work
from
the
context
of
the
resolver.
B
B
A
A
Okay,
where
would
you
like
to
check.
B
So
this
is
a
public
interface
that
is
our
have
right.
Now
we
have
right
now
we
have,
we
don't
have
a
cfg
accessible
as
a
part
of
cfg.
We
have
a
separate
attribute
macro
called
cg
underscore
accessible
that
performs
this
functionality
and
it
is
partially
partially
implemented,
but
not
entirely
so.
B
B
B
B
Return
an
indeterminate
error
because
cfg
accessible
can
also
be
used
during
micro
expansion,
so
it
may
return
false,
so
the
name
is
not
found,
but
the
name
may
be
found
later
and
we
have
some
support
for
indeterminacy
in
our
market
expansion
system.
So
if
the
macro
is
returns
in
the
terminate
result,
then
that
macro
expansion
is
returned
into
the
macro
queue
and
we
are
we'll
attempt
to
expand
it
sometime
later
and
maybe
later
we
will
be
able
to
give
a
determinate
result.
B
B
B
B
Yes,
yes,
so
resolve
path
isn't
exactly
suitable
for
for
this,
it
misses
some,
doesn't
return
complete
functionality.
So
if
the
name
is
not
found,
we
cannot
turn
false
and
the
resolve
path
needs
to
be
modified
and
updated
to
return.
The
correct
result
for
not
correct,
but
usable,
result
for
path
plus
that
may
be
that
related.
B
A
D
D
Okay,
so
let's
let's
go
first
of
all
vadim
thanks.
That
was
great,
very
informative
and
very
helpful.
I
do
have
a
bunch
of
questions.
I
don't
remember
the
the
order
of
things
like.
Why
did
we
have
both
early
and
late
resolution?
Was
it
because
the
expansion
was
in
somewhere
in
the
middle
of
between
these
two.
D
B
B
So
it
is
an
iterative
process
and
early
resolution
is
a
resolution
of
microparts
deeper
paths
that
has
to
be
performed
and
performed
during
this
iterative
process
of
expanding
macros
and
discovering
new
ones
and
a
late
resolution
is
simply
everything
else
that
doesn't
need
to
be
performed
early
and
can
be
performed,
but
all
together
as
a
single
pass
on
the
ice
team.
When
the
isd
is
complete.
D
Okay,
thanks,
that's
that's
clear
at
viewpoints,
you
mentioned
some
things
about
diagnostics
that
were
actually
in
libarus
rather
than
the
correct
file.
D
So
in
in
the
same
vein,
I
was
wondering
what
kind
of
cleanups
documentation
additions,
maybe
some
fixes
of
or
refactors
do
you
think
new
contributors
could
tackle
here
like
just
moving
the
the
things
from
from
the
libs
to
the
diagnostic
file
seems
easy
enough.
So
maybe
some
of
us
could
do
that
and.
D
B
D
Well,
if
you
have
ideas
sometime,
just
let
us
know,
I
believe,
like
a
bunch
of
members
here,
would
like
to
have
some
contributions,
and
so,
if
there
are
easy
issues
like
we
can
walk
through
them,
we
can
walk
them
through
opening
a
pr
anything
like
this.
B
Oh
yes,
I
just,
I
don't
exactly
remember
most
of
the
code
here
for
sure
so
to
find
something
to
refactor.
I
need
to
read
the
code
again.
D
Yeah,
that's
true
as
well.
It's
very
common!
So
in
the
same
vein
I
was
wondering:
do
you
have
plans
like?
I
know
you've
been
working
on
some
refactoring
for
real
stock
like
because
it
clones
the
resolver
or
things
like
that.
So
I
was
wondering
if
you,
you
yourself,
had
future
plans
about
tasks
to
be
done,
but
for
the
resolver.
Besides
this
real
stock,
one.
B
Yes,
I
have
a
pretty
large
queue
of
tasks,
but
I'm
unlikely
to
ever
get
to
them,
because
there
are
always
more
justice
higher
george
yeah.
I.
B
Yes,
maybe
I
will
extract
resolver
related
tasks,
some
smaller
lists
and
posts
into
this
elite
thread.
B
D
I
was
wondering
like
how,
like
is
the
resolve
actually
involving
incremental
compilation
today
or
or
not.
B
D
B
B
D
And
I
was
wondering
like
how
how
fast
is
the
whole
resolving
process
since
it's
interleaved
with
expansion,
I'm
not
sure
if
it's
easy
to
to
pull
apart,
or
did
you
ever
find
some
benchmarks
that
where
resolving
itself
was
slow,
maybe
on
huge
crates,
I'm
not
sure
if
we
really
have
a
lot
of
benchmarks
that
exercise
it
very
much.
B
B
Yeah
one
one
bottleneck
what
was
about
direct
resolution,
people
from
from
microsoft
to
which
implement
the
windows
servers,
create
a
lot
of
drives
in
a
single
file
and
it
triggered
some
potential,
maybe
even
exponential
effects,
and
that
was
a
serious
issue
that
was
encountered
in
practice
and
it
was
fixed
after
someone
else
benchmarked
it.
But
I
didn't
try
to
do
any
benchmarking
in
myself.
D
D
In
the
same
in
the
same
vein,
so
do
you
like
this
seems
hard
to
parallelize
like
do
you
have
thoughts
about
whether
it
would
be
interesting
to
try
to
to
make
the
resolve
a
more
parallel
or.
B
Yes,
because
if
there
are
modules
that
are
isolated
from
each
other
and
resolve
the
name,
some
module,
the
set
of
candidates,
which
is
also
all
of
the
candidates,
are
either
in
this
module
or
fixed.
Before
the
late
compilation
starts,
like
micro
rules,
yeah.
D
B
D
Yeah
for
early
and
since
it
develops,
expansion
and
and
accesses
to
some
shared
data
structures
is
going
to
be
way
harder
and
probably
not
that
useful.
Maybe.
B
Changes
in
other
modules
can
affect
inputs.
This
module
macro
rules
can
appear
and
change
resolutions
in
the
whole
crate,
and
something
like
that.
So
it's
als
also
an
iterative
process.
So
it's
probably
very
hard
to
operalize.
B
Yes,
even
even
during
late
resolution,
some
some
caches
like
like
external
modules-
maybe
it
may
be
populated
so
even
for
late
resolution-
maybe
some
some
locking
may
be
needed,
but
it's
mostly
for
cache,
like
structures.
A
D
Okay,
great,
that's
it
that's
it
for
all
my
questions
thanks
a
lot.
D
A
Yes,
does
anybody
else
have
any
questions
for
vladimir?
It's
such
a
treat
to
have
in
here.
So
if
you
have
any
questions,
don't
hold
back.
C
Of
course,
I
just
wanted
to
say
thank
you
so
much
vadim.
This
was
super
super
helpful
and
I
just
wanted
to
re-emphasize
what
remy
said
like.
I
think
some
of
us
would
be
really
keen
to
contribute
myself
included.
C
So
if
you
have
time
to
put
those
issues
down-
and
you
know
I
know-
probably
it
will
take
you
more
time
to
write
everything
down,
then
it
would
take
you
to
actually
fix
it,
but
in
the
spirit
of
you
know,
having
more
people,
learning
about
name,
resolver
and
contributing,
I
think
that'll
be
cool
yeah
thanks
again.
B
B
A
Sense,
yeah
so
olivia
just
to
speak
to
that
we
we
are
revamping
the
russy
reading
club,
and
so
there
will
likely
be
additional
sessions
on
the
name
resolver
to
help
people
get
to
the
point
where
they
are
where
they
can
contribute
so
stay
tuned.
We
have
a
couple
of
things
to
finish
kind
of
on
the
back
end
like
the
write-up
and
the
the.
A
Consulting
with
the
compiler
team,
so
I
would
say
probably
look
for
something
in
april.
A
And
also,
I
I
usually
update
everything
that
we're
doing
once
we're
ready
on
my
blog,
so
I
have
a
blog
on
medium.
I
probably
should
post
the
link
to
that
somewhere
in
the
in
the
in
the
zoolop
stream.
A
Okay
with
them,
thank
you
so
much.
It
was
wonderful
of
you
to
make
time
for
us
while
you're
on
vacation.
I
don't
know
if
everybody
knows
that
you're
on
vacation,
but
so
thank
you
very
much
for
for
taking
the
time.
This
was
super.
Yes,
thank
you
all
right
thanks.
Everyone.