From 8139e53e9520ced2d113f1538ae9cdad5b5ae8bf Mon Sep 17 00:00:00 2001 From: Orestis Malaspinas <orestis.malaspinas@hesge.ch> Date: Thu, 20 Sep 2018 08:03:31 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20mot=20cl=C3=A9=20shadow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variables.md b/variables.md index df165d9..cddadb9 100644 --- a/variables.md +++ b/variables.md @@ -118,7 +118,7 @@ fn main() { ## Portée (2/2) -- En redéclarant une variable dans un bloc intérieur on peut **masquer** la variable extérieure. +- La redéclarantion d'une variable dans un bloc intérieur **masque** (shadow) la variable extérieure. <pre><code data-trim="hljs rust" class="lang-rust"> fn main() { @@ -182,7 +182,7 @@ fn main() { } </code></pre> -## Masquage +## Masquage (Shadowing) - Possibilité de déclarer une variable avec le même nom qu'une variable précédente. - La nouvelle déclaration **masque** la précédente. -- GitLab